Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::CheckMenuItem Class Reference

A GtkCheckMenuItem C++ wrapper class. More...

#include <xfc/gtk/checkmenuitem.hh>

Inheritance diagram for Xfc::Gtk::CheckMenuItem:

Xfc::Gtk::MenuItem Xfc::Gtk::Item Xfc::Gtk::Bin Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable Xfc::Gtk::RadioMenuItem List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Detailed Description

A GtkCheckMenuItem C++ wrapper class.

A CheckMenuItem is a menu item that maintains the state of a bool value in addition to a MenuItem's usual role in activating application code. A check box indicating the state of the bool value is displayed at the left side of the MenuItem. Activating the MenuItem toggles the value.

See also: the MenuItem and Menu HOWTOs and example.


Constructor & Destructor Documentation

Xfc::Gtk::CheckMenuItem::CheckMenuItem ( GtkCheckMenuItem *  check_menu_item,
bool  owns_reference = false 
) [explicit, protected]

Construct a new CheckMenuItem from an existing GtkCheckMenuItem.

Parameters:
check_menu_item A pointer to a GtkCheckMenuItem.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The check_menu_item can be a newly created GtkCheckMenuItem or an existing GtkCheckMenuItem. (see G::Object::Object).

Xfc::Gtk::CheckMenuItem::CheckMenuItem ( const String label,
bool  use_underline = false 
) [explicit]

Construct a new CheckMenuItem with a Label to the right of it.

Parameters:
label The text for the menu item.
use_underline true if the label contains an underscore, indicating a mnemonic.
If use_underline is true an underscore in label indicates that the next character is the mnemonic accelerator for the menu item.

Xfc::Gtk::CheckMenuItem::CheckMenuItem ( GtkCheckMenuItem *  check_menu_item,
bool  owns_reference = false 
) [explicit, protected]

Construct a new CheckMenuItem from an existing GtkCheckMenuItem.

Parameters:
check_menu_item A pointer to a GtkCheckMenuItem.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The check_menu_item can be a newly created GtkCheckMenuItem or an existing GtkCheckMenuItem. (see G::Object::Object).

Xfc::Gtk::CheckMenuItem::CheckMenuItem ( const String label,
bool  use_underline = false 
) [explicit]

Construct a new CheckMenuItem with a Label to the right of it.

Parameters:
label The text for the menu item.
use_underline true if the label contains an underscore, indicating a mnemonic.
If use_underline is true an underscore in label indicates that the next character is the mnemonic accelerator for the menu item.


Member Function Documentation

bool Xfc::Gtk::CheckMenuItem::get_draw_as_radio (  )  const

Determines whether the check menu item looks like a Gtk::RadioMenuItem.

Returns:
true if the check menu item looks like a Gtk::RadioMenuItem.

void Xfc::Gtk::CheckMenuItem::set_active ( bool  is_active  ) 

Sets the active state of the menu item's check box.

Parameters:
is_active A bool value indicating whether the check box is active.

void Xfc::Gtk::CheckMenuItem::set_inconsistent ( bool  setting  ) 

Display the check in an "in between" state.

Parameters:
setting true to display an "inconsistent" third state check.
If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user explicitly selects a setting. This has to be done manually, set_inconsistent() only affects visual appearance, it doesn't affect the semantics of the widget.

void Xfc::Gtk::CheckMenuItem::set_draw_as_radio ( bool  draw_as_radio  ) 

Sets whether check_menu_item is drawn like a Gtk::RadioMenuItem.

Parameters:
draw_as_radio Set true to draw the check menu item like a Gtk::RadioMenuItem.


Member Data Documentation

const ToggledSignalType Xfc::Gtk::CheckMenuItem::toggled_signal [static, protected]

Toggled signal (see signal_toggled()).

Calls a slot with the signature:

< void function();
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3