diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-05 23:48:25 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-05 23:48:25 +0500 |
| commit | c53067d2f6cfd6e3c6b476c51ab8c4b931e40a30 (patch) | |
| tree | 95bfab59b2d9a38a57b6aa05244cab2d0435c7d2 /fluid/nodes/Node.h | |
| parent | 57860e277f2298ad6c0830b1492087cfa124c862 (diff) | |
wip
Diffstat (limited to 'fluid/nodes/Node.h')
| -rw-r--r-- | fluid/nodes/Node.h | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/fluid/nodes/Node.h b/fluid/nodes/Node.h index 900addc6b..1c94e493d 100644 --- a/fluid/nodes/Node.h +++ b/fluid/nodes/Node.h @@ -79,38 +79,40 @@ typedef struct Strategy { Flags source() { return (Flags)(flags & SOURCE_MASK); } } Strategy; -enum class Type { +typedef int NodeType; +enum { // administrative - Base_, Widget_, Menu_Manager_, Menu_, Browser_, Valuator_, + FLD_NODE_TYPE_Base_, FLD_NODE_TYPE_Widget_, FLD_NODE_TYPE_Menu_Manager_, FLD_NODE_TYPE_Menu_, FLD_NODE_TYPE_Browser_, FLD_NODE_TYPE_Valuator_, // non-widget - Function, Code, CodeBlock, - Decl, DeclBlock, Class, - Widget_Class, Comment, Data, + FLD_NODE_TYPE_Function, FLD_NODE_TYPE_Code, FLD_NODE_TYPE_CodeBlock, + FLD_NODE_TYPE_Decl, FLD_NODE_TYPE_DeclBlock, FLD_NODE_TYPE_Class, + FLD_NODE_TYPE_Widget_Class, FLD_NODE_TYPE_Comment, FLD_NODE_TYPE_Data, // groups - Window, Group, Pack, - Flex, Tabs, Scroll, - Tile, Wizard, Grid, + FLD_NODE_TYPE_Window, FLD_NODE_TYPE_Group, FLD_NODE_TYPE_Pack, + FLD_NODE_TYPE_Flex, FLD_NODE_TYPE_Tabs, FLD_NODE_TYPE_Scroll, + FLD_NODE_TYPE_Tile, FLD_NODE_TYPE_Wizard, FLD_NODE_TYPE_Grid, // buttons - Button, Return_Button, Light_Button, - Check_Button, Repeat_Button, Round_Button, + FLD_NODE_TYPE_Button, FLD_NODE_TYPE_Return_Button, FLD_NODE_TYPE_Light_Button, + FLD_NODE_TYPE_Check_Button, FLD_NODE_TYPE_Repeat_Button, FLD_NODE_TYPE_Round_Button, // valuators - Slider, Scrollbar, Value_Slider, - Adjuster, Counter, Spinner, - Dial, Roller, Value_Input, Value_Output, + FLD_NODE_TYPE_Slider, FLD_NODE_TYPE_Scrollbar, FLD_NODE_TYPE_Value_Slider, + FLD_NODE_TYPE_Adjuster, FLD_NODE_TYPE_Counter, FLD_NODE_TYPE_Spinner, + FLD_NODE_TYPE_Dial, FLD_NODE_TYPE_Roller, FLD_NODE_TYPE_Value_Input, FLD_NODE_TYPE_Value_Output, // text - Input, Output, Text_Editor, - Text_Display, File_Input, Terminal, + FLD_NODE_TYPE_Input, FLD_NODE_TYPE_Output, FLD_NODE_TYPE_Text_Editor, + FLD_NODE_TYPE_Text_Display, FLD_NODE_TYPE_File_Input, FLD_NODE_TYPE_Terminal, // menus - Menu_Bar, Menu_Button, Choice, - Input_Choice, Submenu, Menu_Item, - Checkbox_Menu_Item, Radio_Menu_Item, + FLD_NODE_TYPE_Menu_Bar, FLD_NODE_TYPE_Menu_Button, FLD_NODE_TYPE_Choice, + FLD_NODE_TYPE_Input_Choice, FLD_NODE_TYPE_Submenu, FLD_NODE_TYPE_Menu_Item, + FLD_NODE_TYPE_Checkbox_Menu_Item, FLD_NODE_TYPE_Radio_Menu_Item, // browsers - Browser, Check_Browser, File_Browser, - Tree, Help_View, Table, + FLD_NODE_TYPE_Browser, FLD_NODE_TYPE_Check_Browser, FLD_NODE_TYPE_File_Browser, + FLD_NODE_TYPE_Tree, FLD_NODE_TYPE_Help_View, FLD_NODE_TYPE_Table, // misc - Box, Clock, Progress, - Max_ + FLD_NODE_TYPE_Box, FLD_NODE_TYPE_Clock, FLD_NODE_TYPE_Progress, + FLD_NODE_TYPE_Max_ }; +typedef NodeType Type; void update_visibility_flag(Node *p); void delete_all(int selected_only=0); @@ -300,9 +302,9 @@ public: /** Return 1 if the type browser shall draw a padlock over the icon. */ virtual int is_public() const {return 1;} /** Return the type Type for this Type. */ - virtual Type type() const { return Type::Base_; } + virtual Type type() const { return FLD_NODE_TYPE_Base_; } /** Check if this Type is of the give type Type or derived from that type Type. */ - virtual bool is_a(Type inType) const { return (inType==Type::Base_); } + virtual bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Base_); } const char* class_name(const int need_nest) const; bool is_in_class() const; |
