Entryfield with buttons to increment or decrement the value in the text field. More...
#include <SpinButton.hpp>


Public Member Functions | |
| virtual | ~SpinButton (void) |
| Destructor. More... | |
| SpinButton (void) | |
| Constructor. More... | |
| SpinButton (const int initial_value, const int min_value, const int max_value) | |
| Constructor. More... | |
| SpinButton (const double initial_value, const double min_value, const double max_value, const double step_value=0.1) | |
| Constructor. More... | |
| virtual | operator GtkSpinButton * (void) const |
Convert an instance of nocl::SpinButton to GtkSpinButton*. More... | |
| SpinButton & | value (const int new_value) |
| SpinButton & | value (const double new_value) |
| int | value_int (void) const |
| double | value_double (void) const |
| SpinButton & | get_range (int &min_range, int &max_range) |
| SpinButton & | get_range (double &min_range, double &max_range) |
| SpinButton & | set_range (const int min_range, const int max_range) |
| SpinButton & | set_range (const double min_range, const double max_range) |
| bool | wrap (void) const |
| SpinButton & | wrap (const bool toggle) |
| virtual | operator GtkEntry * (void) const |
Convert an instance of nocl::TextField to GtkEntry*. More... | |
| std::string | text (void) const |
| TextField & | text (const std::string &new_text) |
| virtual | operator GtkWidget * (void) const |
Convert an instance of GUIComponent to GtkWidget*. More... | |
| virtual GUIComponent & | move_to (const Point &p) |
| Move to the specified coordinates. More... | |
| virtual Size | natural_size (void) |
| Get the natural size of a widget. More... | |
| virtual Size | minimum_size (void) |
| Get the minimum size of a widget. More... | |
| virtual GUIComponent & | minimum_size (const Size &s) |
| Set the minimum size of a widget. More... | |
| virtual GUIComponent & | minimum_size (const int width, const int height) |
| Set the minimum size of a widget. More... | |
| virtual GUIComponent & | show (const bool toggle=true) |
| Make the immediate component visible. More... | |
| virtual GUIComponent & | show_all (const bool toggle=true) |
| Make the component and all child components visible. More... | |
| virtual GUIComponent & | hide (void) |
| Hide a single component. More... | |
| virtual bool | is_visible (void) const |
| Determine if the widget is shown. More... | |
Static Public Member Functions | |
| static WidgetToGUIComponentMap & | widget_to_gui_component_map (void) |
| There are times when we have a pointer to a Gtk+ widget, and we need to map it back to the corresponding NOCL GUI component. More... | |
Public Attributes | |
| Container * | parent |
Pointer to the parent to which we've been added. Will be nullptr if this object hasn't been added to a parent container. More... | |
| GtkWidget * | gtk_widget |
| Pointer to the underlying GTK framework. More... | |
Entryfield with buttons to increment or decrement the value in the text field.
This corresponds to GtkSpinButton.
|
virtual |
Destructor.
| nocl::SpinButton::SpinButton | ( | void | ) |
Constructor.
| nocl::SpinButton::SpinButton | ( | const int | initial_value, |
| const int | min_value, | ||
| const int | max_value | ||
| ) |
Constructor.
| nocl::Exception | Throws if GTK+ fails to create a new window. |
References nocl::GUIComponent::gtk_widget, NOCL_WHERE, and value().

| nocl::SpinButton::SpinButton | ( | const double | initial_value, |
| const double | min_value, | ||
| const double | max_value, | ||
| const double | step_value = 0.1 |
||
| ) |
Constructor.
| nocl::Exception | Throws if GTK+ fails to create a new window. |
References nocl::GUIComponent::gtk_widget, NOCL_WHERE, and value().

|
virtual |
Convert an instance of nocl::SpinButton to GtkSpinButton*.
| nocl::Exception | Object was not created correctly and cannot be converted to GtkSpinButton*. |
References nocl::GUIComponent::gtk_widget, and NOCL_WHERE.
| nocl::SpinButton & nocl::SpinButton::value | ( | const int | new_value | ) |
| nocl::SpinButton & nocl::SpinButton::value | ( | const double | new_value | ) |
| int nocl::SpinButton::value_int | ( | void | ) | const |
| double nocl::SpinButton::value_double | ( | void | ) | const |
| nocl::SpinButton & nocl::SpinButton::get_range | ( | int & | min_range, |
| int & | max_range | ||
| ) |
| nocl::SpinButton & nocl::SpinButton::get_range | ( | double & | min_range, |
| double & | max_range | ||
| ) |
| nocl::SpinButton & nocl::SpinButton::set_range | ( | const int | min_range, |
| const int | max_range | ||
| ) |
| nocl::SpinButton & nocl::SpinButton::set_range | ( | const double | min_range, |
| const double | max_range | ||
| ) |
| bool nocl::SpinButton::wrap | ( | void | ) | const |
| nocl::SpinButton & nocl::SpinButton::wrap | ( | const bool | toggle | ) |
|
virtualinherited |
Convert an instance of nocl::TextField to GtkEntry*.
| nocl::Exception | Object was not created correctly and cannot be converted to GtkEntry*. |
References nocl::GUIComponent::gtk_widget, and NOCL_WHERE.
|
inherited |
|
inherited |
|
virtualinherited |
Convert an instance of GUIComponent to GtkWidget*.
References nocl::GUIComponent::gtk_widget.
|
virtualinherited |
Move to the specified coordinates.
|
virtualinherited |
Get the natural size of a widget.
References nocl::GUIComponent::minimum_size().
Referenced by nocl::GUIComponent::minimum_size().


|
virtualinherited |
Get the minimum size of a widget.
References nocl::GUIComponent::natural_size().
Referenced by nocl::GUIComponent::minimum_size(), and nocl::GUIComponent::natural_size().


|
virtualinherited |
Set the minimum size of a widget.
References nocl::Size::height, nocl::GUIComponent::minimum_size(), and nocl::Size::width.

|
virtualinherited |
Set the minimum size of a widget.
|
virtualinherited |
Make the immediate component visible.
| [in] | toggle | Set to true to show the widget, or to false to hide the widget. |
References nocl::GUIComponent::gtk_widget, and nocl::GUIComponent::hide().

|
virtualinherited |
Make the component and all child components visible.
| [in] | toggle | Set to true to show the widget and all children, or to false to hide the widget. |
References nocl::GUIComponent::gtk_widget, and nocl::GUIComponent::hide().

|
virtualinherited |
Hide a single component.
References nocl::GUIComponent::gtk_widget.
Referenced by nocl::GUIComponent::show(), and nocl::GUIComponent::show_all().

|
virtualinherited |
Determine if the widget is shown.
References nocl::GUIComponent::gtk_widget.
|
staticinherited |
There are times when we have a pointer to a Gtk+ widget, and we need to map it back to the corresponding NOCL GUI component.
For example, during event handling, Gtk+ tells us which Gtk+ widget generated the event, but we need the corresponding NOCL object so we can call the event handler with a reference to the correct object.
Referenced by nocl::ButtonHandler::handle_button_events_for(), and nocl::GUIComponent::~GUIComponent().

|
inherited |
Pointer to the parent to which we've been added. Will be nullptr if this object hasn't been added to a parent container.
Referenced by nocl::Container::add_child(), nocl::Grid::add_child(), nocl::Container::remove_child(), and nocl::GUIComponent::~GUIComponent().
|
inherited |
Pointer to the underlying GTK framework.
Referenced by nocl::Box::Box(), nocl::ButtonBox::ButtonBox(), nocl::Grid::Grid(), nocl::ButtonHandler::handle_button_events_for(), nocl::GUIComponent::hide(), nocl::FrameWindow::initialize(), nocl::Window::is_resizable(), nocl::GUIComponent::is_visible(), nocl::Label::Label(), nocl::FrameWindow::operator GtkApplicationWindow *(), nocl::Box::operator GtkBox *(), nocl::Button::operator GtkButton *(), nocl::ButtonBox::operator GtkButtonBox *(), nocl::Container::operator GtkContainer *(), nocl::TextField::operator GtkEntry *(), nocl::Fixed::operator GtkFixed *(), nocl::Grid::operator GtkGrid *(), nocl::Label::operator GtkLabel *(), nocl::Layout::operator GtkLayout *(), operator GtkSpinButton *(), nocl::ToggleSwitch::operator GtkSwitch *(), nocl::TextEditor::operator GtkTextView *(), nocl::GUIComponent::operator GtkWidget *(), nocl::Window::operator GtkWindow *(), nocl::Window::resizable(), nocl::GUIComponent::show(), nocl::GUIComponent::show_all(), SpinButton(), nocl::TextButton::TextButton(), nocl::TextEditor::TextEditor(), nocl::TextField::TextField(), nocl::ToggleSwitch::ToggleSwitch(), and nocl::GUIComponent::~GUIComponent().