按钮

gtkmm 提供以下四种基本按钮控件:

按钮 (Button)

Gtk::Button. Standard buttons, usually marked with a label or picture. Pushing one triggers an action. See the Button section.

开关按钮 (ToggleButton)

Gtk::ToggleButton. Unlike a normal Button, which springs back up, a ToggleButton stays down until you press it again. It might be useful as an on/off switch. See the ToggleButton section.

复选框 (CheckButton)

Gtk::CheckButton. These act like ToggleButtons, but show their state in small squares, with their label at the side. They should be used in most situations which require an on/off setting. See the CheckBox section.

单选框 (RadioButton)

Gtk::RadioButton. Named after the station selectors on old car radios, these buttons are used in groups for options which are mutually exclusive. Pressing one causes all the others in its group to turn off. They are similar to CheckBoxes (a small widget with a label at the side), but usually look different. See the RadioButton section.

请注意,由于GTK+的主题不同,这些控件外观可能会不同。特别是复选框和单选按钮可能会很不一样。