mk-project Gtk3 types

mk-project implement some few derivate Widgets, which I will present here.

You can take a look at the source located in the sub-folders from /usr(/local)/share/mk-project/src.

To learn how to implement this kind of Widgets:

note:Here you can sea how a sphinx documentation looks like, with this theme, for C code (c++ code can be documented too) with sphinx.

GtkSmartIconButton

A simple button with an icon without label and tool-tip which embed an universal short-cut text.

GtkWidget* gtk_smart_menu_item_new_all(const gchar *label, const gchar *icon_filepath, GtkAccelGroup *accel_group, const GdkModifierType accel_modifier, const guint accel_key) ;
Parameters:
  • label (const gchar *) – The label to display into the menu item.
  • icon_filepath (const gchar *) – The menu item icon file-path.
  • accel_group (GtkAccelGroup *) – The shortcut accelerator group.
  • accel_modifier (const GdkModifierType) – The shortcut modifier.
  • accel_key (const guint) – The shortcut accelerator key.
Return type:

GtkWidget*

Returns:

A pointer to the GtkSmartMenuItem.

GtkWidget* gtk_smart_check_menu_item_new_all(const gchar *label, const gboolean draw_as_radio, const gchar *icon_filepath, GtkAccelGroup *accel_group, const GdkModifierType accel_modifier, const guint accel_key) ;
Parameters:
  • label (const gchar *) – The label to display into the menu item.
  • draw_as_radio (const gboolean) – draw_as_radio
  • icon_filepath (const gchar *) – The menu item icon file-path.
  • accel_group (GtkAccelGroup *) – The shortcut accelerator group.
  • accel_modifier (const GdkModifierType) – The shortcut modifier.
  • accel_key (const guint) – The shortcut accelerator key.
Return type:

GtkWidget*

Returns:

A pointer to the GtkSmartMenuItem check button.

GtkWidget* gtk_smart_radio_menu_item_new_all(const gchar *label, const gchar *icon_filepath, GtkAccelGroup *accel_group, const GdkModifierType accel_modifier, const guint accel_key, GtkWidget* widget) ;
Parameters:
  • label (const gchar *) – The label to display into the menu item.
  • draw_as_radio (const gboolean) – draw_as_radio
  • icon_filepath (const gchar *) – The menu item icon file-path.
  • accel_group (GtkAccelGroup *) – The shortcut accelerator group.
  • accel_modifier (const GdkModifierType) – The shortcut modifier.
  • accel_key (const guint) – The shortcut accelerator key.
  • widget (NULL or GtkWidget*) – A member from the radio button group.
Return type:

GtkWidget*

Returns:

A pointer to the GtkSmartMenuItem radio button.

Note

You can pass a NULL pointer or 0 to the parameters :

  • icon_filepath
  • accel_group
  • accel_modifier
  • accel_key.
  • widgets.
note:You can build others constructors if you have understand How-To build this kind of widgets.

Getters

GtkWidget* gtk_smart_menu_item_get_image(GtkWidget* smart_menu_item) ;
Parameters:
  • smart_menu_item (GtkWidget*) – The return value from the constructors.
Return type:

GtkWidget*

Returns:

A pointer to the GtkImage widget.

GtkWidget* gtk_smart_menu_item_get_menuitem(GtkWidget* smart_menu_item) ;
Parameters:
  • smart_menu_item (GtkWidget*) – The return value from the constructors.
Return type:

GtkWidget*

Returns:

A pointer to the GtkMenuItem widget.

GtkWidget* gtk_smart_menu_item_get_label(GtkWidget* smart_menu_item) ;
Parameters:
  • smart_menu_item (GtkWidget*) – The return value from the constructors.
Return type:

GtkWidget*

Returns:

A pointer to the GtkLabel widget.

GtkWidget* gtk_smart_menu_item_get_accel_label(GtkWidget* smart_menu_item) ;
Parameters:
  • smart_menu_item (GtkWidget*) – The return value from the constructors.
Return type:

GtkWidget*

Returns:

A pointer to the GtkAccelLabel widget.

GtkSmartIconButton

A simple button with an icon without label and tool-tip which embed an universal short-cut text.

Constructors

GtkWidget* gtk_smart_icon_button_new_all(const gchar *filepath, const gchar *tooltip_text, const guint accel_key, const GdkModifierType accel_modifier) ;
Parameters:
  • filepath (const gchar *) – The filepath to the image to use as icon.
  • tooltip_text (const gchar *) – The tool-tip text without the accelerator label.
  • accel_key (const guint) – The shortcut accelerator key.
  • accel_modifier (const GdkModifierType) – The shortcut modifier.
Return type:

GtkWidget*

Returns:

A pointer to the GtkSmartIconButton widget.

GtkWidget* gtk_smart_icon_toggle_button_new_all(const gchar *filepath, const gchar *tooltip_text, const guint accel_key, const GdkModifierType accel_modifier) ;
Parameters:
  • filepath (const gchar *) – The filepath to the image to use as icon.
  • tooltip_text (const gchar *) – The tool-tip text without the accelerator label.
  • accel_key (const guint) – The shortcut accelerator key.
  • accel_modifier (const GdkModifierType) – The shortcut modifier.
Return type:

GtkWidget*

Returns:

A pointer to the GtkSmartIconButton toggle button widget.

note:This widget is not used into mk-project but provided in the hope to be useful.

GtkTermTab

A GtkNoteBook tab with an decorative icon, a label, and close icon button.

Constructor

GtkWidget* gtk_mk_term_tab_new(const gchar *icon_filepath, const gchar *label, const gchar *close_filepath) ;
Parameters:
  • icon_filepath (const gchar *) – Image filepath to display as decoration on the right of the tab-label.
  • label (const gchar *) – The label to display in the GtkMkTermTab.
  • close_filepath (const gchar *) – Image filepath to display in the GtkMkTermTab as close button icon.
Return type:

GtkWidget*

Returns:

A pointer to the Widget GtkMkTerm.

Getters

GtkWidget* gtk_mk_term_tab_get_close_button(GtkMkTermTab *tab);
Parameters:
  • tab (const gchar *) – An instance of the GtkMkTermTab.
Return type:

GtkWidget*

Returns:

A pointer to the Widget GtkButton at the right of the label.

GtkMkTerm

warning:This widget implementation is not reusable as is, because of VteTerminal configuration variables.

Constructor

GtkWidget* gtk_mkterm_new(gboolean initialize, gboolean is_edit_term) ;
Parameters:
  • initialize (gboolean) – Initializing or reconfiguring the GtkMkTerm.
  • is_edit_term (gboolean) – Whether or not the GtkMkTerm is a editor widget.
Return type:

GtkWidget*

Returns:

A pointer to the Widget GtkMkTerm.

Getters

GtkWidget* gtk_mkterm_get_vte_terminal(GtkWidget* mkterm) ;
Parameters:
  • mkterm (GtkWidget*) – An instance of the GtkMkTerm Widget.
Return type:

GtkWidget*

Returns:

A pointer to the VteTerminal.

GtkWidget* gtk_mkterm_get_clipboard_menu(GtkWidget* mkterm) ;
Parameters:
  • mkterm (GtkWidget*) – Initializing or reconfiguring the GtkMkTerm.
Return type:

GtkWidget*

Returns:

A pointer to the GtkMenu associated to the GtkMkTerm.