Class Index Cross Index Namespace Index

Class Gtk::CheckMenuItem

A menu item with a check box.
Contained in: Gtk
Derived from: Gtk::MenuItem
Derived by: Gtk::RadioMenuItem

#include <gtk--/checkmenuitem.h>


public function member index:

CheckMenuItem();
explicit CheckMenuItem(const string& label, gfloat x=0.0, gfloat y=0.5);
bool always_show_toggle() const;
guint get_active() const;
GtkCheckMenuItem* gtkobj();
const GtkCheckMenuItem* gtkobj() const;
static bool isA(Object* object);
bool is_active() const;
void set_active(bool state=true);
void set_show_toggle(bool always);
emitable signal void toggled();
virtual ~CheckMenuItem();
 

protected function member index:

virtual void draw_indicator_impl(GdkRectangle* p0);
virtual void toggled_impl();
 

Description:

A Gtk::CheckMenuItem is a menu item that maintains the state of a boolean value in addition to a Gtk::MenuItem's usual role in activating application code.

A check box indicating the state of the boolean value is displayed at the left side of the GtkMenuItem. Activating the GtkMenuItem toggles the value.


Function Member Descriptions:

Gtk::CheckMenuItem::CheckMenuItem - Creates a new GtkCheckMenuItem with a label.

explicit CheckMenuItem(const string& label, gfloat x=0.0, gfloat y=0.5);
label: The string to use for the label.


Gtk::CheckMenuItem::gtkobj - Returns the underlaying gtk+ object.

GtkCheckMenuItem* gtkobj();

Gtk::CheckMenuItem::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::CheckMenuItem::is_active - Get's the active state of the widget.

bool is_active() const;

Gtk::CheckMenuItem::set_active - Sets the active state of the menu item's check box.

void set_active(bool state=true);
state: Boolean value indicating whether the check box is active.


Gtk::CheckMenuItem::set_show_toggle - Controls whether the check box is shown at all times.

void set_show_toggle(bool always);
Normally the check box is shown only when it is active or while the menu item is selected.

always: Boolean value indicating whether to always show the check box.