Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::CheckMenuItem Class Reference

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

`#include <inti/gtk/checkmenuitem.h>`

Inheritance diagram for Inti::Gtk::CheckMenuItem:

List of all members.

## Public Member Functions

Constructors

- CheckMenuItem ()
    Construct a new CheckMenuItem.
- CheckMenuItem (const String &label, bool use_underline=false)
    Construct a new CheckMenuItem with a Label to the right of it.
- virtual ~CheckMenuItem ()
    Destructor.

Accessors

- GtkCheckMenuItem * gtk_check_menu_item () const
    Get a pointer to the GtkCheckMenuItem structure.
- GtkCheckMenuItemClass * gtk_check_menu_item_class () const
    Get a pointer to the GtkCheckMenuItemClass structure.
- operator GtkCheckMenuItem * () const
    Conversion operator; safely converts a CheckMenuItem to a GtkCheckMenuItem pointer.
- bool get_active () const
    Returns true if the check menu item is active (see set_active()).
- bool get_inconsistent () const
    Returns true if the check menu item is in an "in between" state.

Methods

- void set_active (bool is_active)
    Sets the active state of the menu item's check box.
- void set_inconsistent (bool setting)
    Display the check in an "in between" state.
- void toggled ()
    Emits the "toggled" signal.

Property Proxies

- const ActivePropertyProxy prop_active ()
    Whether the menu item is checked (bool : Read / Write).
- const InconsistentPropertyProxy prop_inconsistent ()
    Whether to display an "inconsistent" state (bool : Read / Write).

Signal Proxies

- const ToggledSignalProxy sig_toggled ()
    Connect to the toggled_signal; emitted when the state of the check box is changed.

## Protected Member Functions

Constructors

- CheckMenuItem (GtkCheckMenuItem *check_menu_item, bool reference=false)
    Construct a new CheckMenuItem from an existing GtkCheckMenuItem.

Signal Handlers

- virtual void on_toggled ()
    Called when the state of the check box is changed; call get_active() to discover the new state.

## 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.

## Constructor & Destructor Documentation

Inti::Gtk::CheckMenuItem::CheckMenuItem | ( | GtkCheckMenuItem * | check_menu_item,
|  | bool | reference = false
| ) | `[explicit, protected]`

  | Construct a new CheckMenuItem from an existing GtkCheckMenuItem. Parameters:
  check_menu_item | A pointer to a GtkCheckMenuItem.
  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).

Inti::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

void Inti::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 Inti::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.

The documentation for this class was generated from the following file:

- checkmenuitem.h

Main Page - Footer