6 #include "../listener.h"
13 class TabsSelectionListener;
21 enum {TOOLBOX_CLASS = 0x402c };
137 void label(
int index,
const std::string &text);
142 std::string
label(
int index)
const;
144 void hide_tab(
int index,
bool hide);
void selected(int index)
Set selected tab.
Definition: tabs.h:110
Tabs & operator=(const tbx::Gadget &other)
Assign a Tabs gadget to refer to the same underlying toolbox gadget as an existing Gadget.
Definition: tabs.h:69
void label(int index, const std::string &text)
Set the label for the tab.
Definition: tabs.cc:56
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
int tab_from_window(const tbx::Window &window)
Get tab index from Window.
Definition: tabs.cc:19
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
Tabs()
Construct an uninitialised Tabs gadget.
Definition: tabs.h:23
The Window object represents a toolbox window.
Definition: window.h:70
Tabs & operator=(const Tabs &other)
Assign a Tabs gadget to refer to the same underlying toolbox gadget as another.
Definition: tabs.h:61
int int_property(int property_id) const
Get an integer property from the toolbox Component.
Definition: component.cc:165
int selected() const
Get selected tab.
Definition: tabs.h:117
Tabs & operator=(const tbx::Component &other)
Assign a Tabs gadget to refer to the same underlying toolbox component as an existing Gadget.
Definition: tabs.h:78
Base class for components in an object.
Definition: component.h:42
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
Window window()
Get the window that contains this gadget.
Definition: gadget.h:83
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
bool operator==(const tbx::Gadget &other) const
Check if this Tabs gadget refers to the same underlying toolbox gadget as another gadget.
Definition: tabs.h:85
Tabs(const tbx::Component &other)
Construct a Tabs gadget from a gadget.
Definition: tabs.h:55
bool operator!=(const tbx::Gadget &other) const
Check if this Tabs gadget refers to the same underlying toolbox gadget as another gadget.
Definition: tabs.h:92
Listener for change of tab.
Definition: tabsselectionlistener.h:41
Tabs(const Tabs &other)
Construct a Tabs gadget from another Tabs gadget.
Definition: tabs.h:36
tbx::Window window_from_tab(int index)
Get Window from tab index.
Definition: tabs.cc:38
void state(int value)
Set the state.
Definition: tabs.h:97
void hide_tab(int index, bool hide)
Hide or show a tab.
Definition: tabs.cc:108
int state() const
Get the state of the Tabs gadget.
Definition: tabs.h:103
~Tabs()
Destroy a Tabs gadget.
Definition: tabs.h:29
int _id
Underlying toolbox component id.
Definition: component.h:46
Class for Rick Griffins Tabs Gadget.
Definition: tabs.h:19
This is the base class for all Gadgets.
Definition: gadget.h:49
Tabs(const Gadget &other)
Construct a Tabs gadget from another gadget.
Definition: tabs.h:47
void check_toolbox_class(int class_id) const
Check the underlying gadget class for this object has the given class id.
Definition: gadget.cc:47