32 #ifndef TBX_REPORTVIEW_H_
33 #define TBX_REPORTVIEW_H_
50 unsigned int _column_gap;
57 std::vector<ColInfo> _columns;
90 void column_width(
unsigned int column,
unsigned int width);
93 void size_column_to_width(
unsigned int column,
unsigned int min_width = 0,
unsigned int max_width = 0xFFFFFFFF);
94 void size_all_to_width(
unsigned int min_width = 0,
unsigned int max_width = 0xFFFFFFFF);
112 virtual void inserted(
unsigned int where,
unsigned int how_many);
113 virtual void removing(
unsigned int where,
unsigned int how_many);
114 virtual void removed(
unsigned int where,
unsigned int how_many);
115 virtual void changing(
unsigned int where,
unsigned int how_many);
116 virtual void changed(
unsigned int where,
unsigned int how_many);
120 void cell_changed(
unsigned int index,
unsigned int column);
132 virtual void get_bounds(
BBox &bounds,
unsigned int first,
unsigned int last)
const;
virtual void removing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be removed.
Definition: reportview.cc:458
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
virtual void redraw(const tbx::RedrawEvent &event)
Redraw the window.
Definition: reportview.cc:797
unsigned int row_height() const
Get the height of one row of the report.
Definition: reportview.h:69
The Window object represents a toolbox window.
Definition: window.h:70
bool adjust_max_width(unsigned int start, unsigned int end)
Adjust column widths and total width if any items in the given range exceed the current widths.
Definition: reportview.cc:343
virtual void process_drag_selection(const BBox &drag_box, bool adjust)
Override this method to process selection by dragging.
Definition: reportview.cc:1011
virtual void changed(unsigned int where, unsigned int how_many)
Inform the view that items have been changed.
Definition: reportview.cc:573
unsigned int row_count() const
Get the number of rows in the report view.
Definition: reportview.h:88
unsigned int column_gap() const
Get the gap between columns in the report.
Definition: reportview.h:75
unsigned int column_count() const
Get the number of columns in the report view.
Definition: reportview.h:84
Class to handle the display/interaction with a list of items presented in columns.
Definition: reportview.h:46
virtual void inserted(unsigned int where, unsigned int how_many)
Call after inserting rows into the collection the ReportView is showing.
Definition: reportview.cc:417
void cell_changed(unsigned int index, unsigned int column)
Inform the view that items have been changed.
Definition: reportview.cc:699
bool adjust_min_width(unsigned int from, unsigned int end)
Check if any of the column widths have been reduced and adjust columns if necessary.
Definition: reportview.cc:380
int x_from_column(unsigned int column) const
Return x coordinate relative to window of column.
Definition: reportview.cc:778
void size_all_to_width(unsigned int min_width=0, unsigned int max_width=0xFFFFFFFF)
Size all columns to content.
Definition: reportview.cc:306
void cell_changing(unsigned int index, unsigned int column)
Inform the view that one column has been changed.
Definition: reportview.cc:675
virtual unsigned int insert_index(const Point &scr_pt) const
Return the index for inserting an item from a screen point.
Definition: reportview.cc:867
unsigned int column_from_x(int x) const
Get column from position on window.
Definition: reportview.cc:759
unsigned int add_column(ItemRenderer *cr, unsigned int width=0)
Add a column to the report view.
Definition: reportview.cc:197
bool auto_size() const
Returns true if auto size is on.
Definition: itemview.h:128
void remove_column(unsigned int column)
Remove column from report.
Definition: reportview.cc:223
tbx::Window & window()
Return the Window that this item view is attached to.
Definition: itemview.h:107
void size_column_to_width(unsigned int column, unsigned int min_width=0, unsigned int max_width=0xFFFFFFFF)
Size column to content.
Definition: reportview.cc:282
Class to represent a two dimensional bounding box.
Definition: bbox.h:38
Base class for views that show an indexed list of items.
Definition: itemview.h:68
virtual void refresh()
Called to refresh the entire views contents.
Definition: reportview.cc:178
virtual void cleared()
Whole view has been cleared.
Definition: reportview.cc:633
Class to represent a position in two dimensional space.
Definition: point.h:37
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: reportview.cc:915
virtual void update_window_extent()
Called to update the window extent needed to contain this view.
Definition: reportview.cc:154
virtual ~ReportView()
Destructor of report view.
Definition: reportview.cc:52
Base class to render an indexed item.
Definition: itemrenderer.h:54
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: reportview.cc:891
virtual void changing(unsigned int where, unsigned int how_many)
Inform the view that items are about to be changed.
Definition: reportview.cc:540
void column_width(unsigned int column, unsigned int width)
Set the column width.
Definition: reportview.cc:242
virtual void get_bounds(BBox &bounds, unsigned int index) const
Get bounding box of the given index in work area coordinates.
Definition: reportview.cc:961
Event passed to redraw listener to give details on the area that needs a redraw.
Definition: redrawlistener.h:44
unsigned int _count
Number of items displayed in this view.
Definition: itemview.h:75
ReportView(tbx::Window window)
Construct a report view for a window.
Definition: reportview.cc:43
void get_cell_bounds(BBox &bounds, unsigned int row, unsigned int column) const
Get the cell bounds for the specified column and row.
Definition: reportview.cc:994
unsigned int calc_row_height() const
Calculate the row height from the first row of the report.
Definition: reportview.cc:88
virtual void removed(unsigned int where, unsigned int how_many)
Call after removing rows from the collection the ReportView is showing.
Definition: reportview.cc:493