32 #ifndef TBX_TILEVIEW_H_ 33 #define TBX_TILEVIEW_H_ 36 #include "../openwindowlistener.h" 79 virtual void inserted(
unsigned int where,
unsigned int how_many);
80 virtual void removing(
unsigned int where,
unsigned int how_many);
81 virtual void removed(
unsigned int where,
unsigned int how_many);
82 virtual void changing(
unsigned int where,
unsigned int how_many);
83 virtual void changed(
unsigned int where,
unsigned int how_many);
95 virtual void get_bounds(
BBox &bounds,
unsigned int first,
unsigned int last)
const;
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Class to represent a two-dimensional size.
Definition: size.h:34
ItemRenderer * _item_renderer
Renderer for items in the tile view.
Definition: tileview.h:51
Helper classes to display and edit data.
virtual void redraw(const tbx::RedrawEvent &event)
Redraw the window.
Definition: tileview.cc:184
bool recalc_layout(const BBox &visible_area)
Recalculate the cell layout and update/refresh the window.
Definition: tileview.cc:271
Class to represent a two dimensional bounding box.
Definition: bbox.h:37
tbx::Window & window()
Return the Window that this item view is attached to.
Definition: itemview.h:107
virtual void update_window_extent()
Update the Window extent after a change in size.
Definition: tileview.cc:256
virtual void get_bounds(BBox &bounds, unsigned int index) const
Get the cell bounds for the specified index.
Definition: tileview.cc:649
virtual unsigned int insert_index(const Point &scr_pt) const
Find the index to insert an item based on the screen coordinates given.
Definition: tileview.cc:543
Class to show items tiled in a window.
Definition: tileview.h:48
void item_renderer(ItemRenderer *ir)
Change the item renderer.
Definition: tileview.cc:62
Base class for views that show an indexed list of items.
Definition: itemview.h:63
TileView(tbx::Window window, ItemRenderer *item_renderer=0)
Construct a tile view for specific Window using the given item renderer.
Definition: tileview.cc:42
virtual unsigned int hit_test(const Point &scr_pt) const
Hit test the given screen point.
Definition: tileview.cc:612
Base class to render an indexed item.
Definition: itemrenderer.h:53
virtual void inserted(unsigned int where, unsigned int how_many)
Inform the view that items have been inserted.
Definition: tileview.cc:311
Class to represent a position in two dimensional space.
Definition: point.h:36
const tbx::Size & tile_size() const
Return the size of a tile.
Definition: tileview.h:64
void size_to_tiles()
Size to match content.
Definition: tileview.cc:127
virtual void changing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be changed.
Definition: tileview.cc:427
virtual void process_drag_selection(const BBox &drag_box, bool adjust)
Override this method to process selection by dragging.
Definition: tileview.cc:690
Event passed to redraw listener to give details on the area that needs a redraw.
Definition: redrawlistener.h:43
virtual void removing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be removed.
Definition: tileview.cc:359
virtual void changed(unsigned int where, unsigned int how_many)
Inform the view that items have been changed.
Definition: tileview.cc:451
virtual void refresh()
Refresh the whole report view.
Definition: tileview.cc:300
bool auto_size() const
Returns true if auto size is on.
Definition: itemview.h:128
The Window object represents a toolbox window.
Definition: window.h:69
virtual void removed(unsigned int where, unsigned int how_many)
Inform the view that items have been removed.
Definition: tileview.cc:383
virtual void cleared()
Whole view has been cleared.
Definition: tileview.cc:512
tbx::Size _tile_size
Size of tiles.
Definition: tileview.h:52
tbx::Size check_size(unsigned int from, unsigned int end)
Check if size has been reduced to less than tile_size.
Definition: tileview.cc:167
virtual unsigned int screen_index(const Point &scr_pt) const
Get item index for the screen location (if any)
Definition: tileview.cc:579
Listener for Wimp Open Window Request events.
Definition: openwindowlistener.h:97
Event data for open window request listener.
Definition: openwindowlistener.h:39
virtual void open_window(tbx::OpenWindowEvent &event)
Window has been opened or resized, so re do layout.
Definition: tileview.cc:242
int _cols_per_row
Number of tiles in a row.
Definition: tileview.h:53
tbx::Size max_size(unsigned int from, unsigned int end)
Measure the maximum tile size for a range of items.
Definition: tileview.cc:146