32 #ifndef TBX_LISTVIEW_H_
33 #define TBX_LISTVIEW_H_
72 unsigned int width()
const;
74 unsigned int max_width(
unsigned int from,
unsigned int end);
75 unsigned int check_width(
unsigned int from,
unsigned int end);
92 virtual void inserted(
unsigned int where,
unsigned int how_many);
93 virtual void removing(
unsigned int where,
unsigned int how_many);
94 virtual void removed(
unsigned int where,
unsigned int how_many);
95 virtual void changing(
unsigned int where,
unsigned int how_many);
96 virtual void changed(
unsigned int where,
unsigned int how_many);
105 virtual void get_bounds(
BBox &bounds,
unsigned int first,
unsigned int last)
const;
virtual void removed(unsigned int where, unsigned int how_many)
Inform the view that items have been removed.
Definition: listview.cc:363
virtual void changing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be changed.
Definition: listview.cc:400
virtual ~ListView()
Destructor.
Definition: listview.cc:55
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
void item_renderer(ItemRenderer *ir)
Change the item renderer.
Definition: listview.cc:66
Base class for views that show an indexed list of items.
Definition: itemview.h:63
virtual void cleared()
Whole view has been cleared.
Definition: listview.cc:477
virtual void update_window_extent()
Called to update the window extent needed to contain this view.
Definition: listview.cc:261
Base class to render an indexed item.
Definition: itemrenderer.h:53
virtual void get_bounds(BBox &bounds, unsigned int index) const
Get bounding box of the given index in work area coordinates.
Definition: listview.cc:589
unsigned int width() const
Return the current width of the ListView.
Class to represent a position in two dimensional space.
Definition: point.h:36
Event passed to redraw listener to give details on the area that needs a redraw.
Definition: redrawlistener.h:43
bool auto_size() const
Returns true if auto size is on.
Definition: itemview.h:128
virtual void process_drag_selection(const BBox &drag_box, bool adjust)
Override this method to process selection by dragging.
Definition: listview.cc:616
virtual void changed(unsigned int where, unsigned int how_many)
Inform the view that items have been changed.
Definition: listview.cc:423
virtual unsigned int screen_index(const Point &scr_pt) const
Return the index under the screen point, does not check if it hits content of the item renderer...
Definition: listview.cc:523
The Window object represents a toolbox window.
Definition: window.h:69
ListView(tbx::Window window, ItemRenderer *item_renderer=0)
Constructor.
Definition: listview.cc:44
virtual void removing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be removed.
Definition: listview.cc:340
unsigned int _width
Width of list view.
Definition: listview.h:51
virtual unsigned int hit_test(const Point &scr_pt) const
Return the index under the screen point, checks if it hits content of the item renderer.
Definition: listview.cc:550
void size_to_width(unsigned int min_width=0, unsigned int max_width=0xFFFFFFFF)
Size width to match content.
Definition: listview.cc:196
virtual void inserted(unsigned int where, unsigned int how_many)
Inform the view that items have been inserted.
Definition: listview.cc:302
unsigned int _height
Height of one item.
Definition: listview.h:50
ItemRenderer * _item_renderer
Object used to render itesm.
Definition: listview.h:49
Class to show items in a list down the window.
Definition: listview.h:46
unsigned int check_width(unsigned int from, unsigned int end)
Check if width has been reduced to less then _width.
Definition: listview.cc:177
virtual unsigned int insert_index(const Point &scr_pt) const
Return the index for inserting an item from a screen point.
Definition: listview.cc:505
unsigned int row_height() const
Return the row height.
Definition: listview.h:64
virtual void redraw(const tbx::RedrawEvent &event)
Redraw the List view.
Definition: listview.cc:212
virtual void refresh()
Called to refresh the entire views contents.
Definition: listview.cc:286
unsigned int max_width(unsigned int from, unsigned int end)
Measure the maximum width for a range of rows.
Definition: listview.cc:157