it-edit smart widgets

it-edit implement some few self build widget:

Note

If you get interest into Gtk-3 widget building

you can broad the source to understand How-To build GtkWidget(s) for Gtk-3 from your own.

GtkSmartMenuItem

A simple menu item containing:

  • An icon.
  • A label.
  • An universal shortcut text.

Constructors

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.

Note

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

  • icon_filepath
  • accel_group
  • accel_modifier
  • accel_key.
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.

Getters

GtkWidget* gtk_smart_icon_button_get_image(GtkWidget *smart_icon_button) ;
Parameters:
  • smart_icon_button (GtkWidget *) – The return value from the constructor of a GtkSmartIconButton.
Return type:

GtkWidget *

Returns:

A pointer to the GtkImage widget.

GtkItTerm

Not reusable like this.

Note

I’ve learned how to implement self builded Gtk-3 widgets

If you get interest in building widgets take a look at the source for basics.