48 #ifndef _TBX_VIEW_GADGETLISTVIEW_ 49 #define _TBX_VIEW_GADGETLISTVIEW_ 51 #include "../window.h" 52 #include "../gadget.h" 53 #include "../margin.h" 54 #include "../res/reswindow.h" 95 unsigned int _num_gadgets;
98 unsigned int _row_height;
99 unsigned int _spacing;
102 bool _updates_enabled;
118 unsigned int count()
const {
return _count;}
148 void update_window_extent();
159 return row * _num_gadgets + _first_gadget_id + col;
168 return _window.
gadget(row * _num_gadgets + _first_gadget_id + col);
173 void remove(
unsigned int row,
unsigned int count = 1);
176 void copy(
unsigned int from_row,
unsigned int to_row);
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Base class for gadget memory resources.
Definition: resgadget.h:42
tbx::ComponentId gadget_id(int row, int col) const
Return the gadget_id for a specific row and column.
Definition: gadgetlistview.h:157
This is the base class for all Gadgets.
Definition: gadget.h:48
Helper classes to display and edit data.
unsigned int count() const
Return the number of rows.
Definition: gadgetlistview.h:118
int ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
const tbx::Margin & margin() const
Return the margin around the data in the window.
Definition: gadgetlistview.h:128
Window resource object.
Definition: reswindow.h:48
Class to represent a margin around an area.
Definition: margin.h:34
virtual void copy_row(GadgetListView &glv, unsigned int from_row, unsigned int to_row)
Copy data from one row in a gadget list to another.
Definition: gadgetlistview.cc:380
tbx::Window & window()
Return the window this view is attached to.
Definition: gadgetlistview.h:123
void updates_enabled(bool enabled)
Set if updating of the window extent is enabled.
Definition: gadgetlistview.h:146
Interface for copying from one row to another.
Definition: gadgetlistview.h:65
unsigned int num_gadgets() const
Return the number of gadgets in a row.
Definition: gadgetlistview.h:114
The Window object represents a toolbox window.
Definition: window.h:69
Class to create a list view with each line made up of one or more gadgets.
Definition: gadgetlistview.h:88
tbx::Gadget gadget(int row, int col)
Return the gadget for a specified row and column.
Definition: gadgetlistview.h:166
bool updates_enabled() const
Check if updating of the window extent is enabled.
Definition: gadgetlistview.h:137
Gadget gadget(ComponentId component_id)
Get the gadget with the given component id.
Definition: window.cc:514