diff options
Diffstat (limited to 'ldmicro/lib/linuxUI/linuxUI.cpp')
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ldmicro/lib/linuxUI/linuxUI.cpp b/ldmicro/lib/linuxUI/linuxUI.cpp index 9d912ea..fea10b5 100644 --- a/ldmicro/lib/linuxUI/linuxUI.cpp +++ b/ldmicro/lib/linuxUI/linuxUI.cpp @@ -2,6 +2,16 @@ /// Menu Variables HWID window; + +/// EnableMenuItem Variables +const UINT MF_ENABLED = 0; +const UINT MF_GRAYED = 1; +const UINT MF_CHECKED = 2; +const UINT MF_UNCHECKED = 3; + +/// ListStore +GtkWidget* view; +GtkTreeViewColumn* column; /// Wraper function for gtk_window_has_toplevel_focus BOOL isFocus(HWID window) @@ -132,3 +142,25 @@ BOOL GetSaveFileName(OPENFILENAME *ofn) return exitStatus; } + +void EnableMenuItem(HMENU MenuName, HMENU MenuItem, UINT CheckEnabledItem) { + switch (CheckEnabledItem){ + case MF_ENABLED : + gtk_widget_set_sensitive (MenuItem, true); + break; + case MF_GRAYED : + gtk_widget_set_sensitive (MenuItem, false); + break; + } +} + +void CheckMenuItem(HMENU MenuName, HMENU MenuItem, UINT Check){ + switch (Check){ + case MF_CHECKED : + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(MenuItem), true); + break; + case MF_UNCHECKED : + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(MenuItem), false); + break; + } +}
\ No newline at end of file |