|
| template<class Self> |
| Self & | columns (this Self &self, std::vector< DataGridColumn > columns) |
|
const std::vector< DataGridColumn > & | columns () const |
| template<class Self> |
| Self & | column (this Self &self, DataGridColumn column) |
| DataGridRow & | row (const std::vector< std::string > &values) |
| std::vector< DataGridRow * > | dataRows () const |
| Div & | body () const |
| Div & | header () const |
| DataGridRow * | selectedRow () const |
|
int | sortColumn () const |
|
SortOrder | sortOrder () const |
| template<class Self> |
| Self & | sort (this Self &self, int column, SortOrder order) |
|
| RowGroup (const RowGroup &)=delete |
|
RowGroup & | operator= (const RowGroup &)=delete |
|
| RowGroup (RowGroup &&)=delete |
|
RowGroup & | operator= (RowGroup &&)=delete |
| virtual std::vector< SelectableRow * > | rows () const |
| SelectableRow * | selection () const |
| int | selectedIndex () const |
| template<class Self> |
| Self & | select (this Self &self, SelectableRow *row) |
| template<class Self> |
| Self & | select (this Self &self, int index) |
| | Div (const Div &)=delete |
| Div & | operator= (const Div &)=delete |
|
| Div (Div &&)=delete |
|
Div & | operator= (Div &&)=delete |
| std::string | toString () const |
| virtual Window * | window () |
|
virtual const Window * | window () const |
| Div * | parent () |
| const Div * | parent () const |
| int | depth () const |
| unsigned int | childCount () const |
| const std::vector< std::shared_ptr< Div > > & | children () const |
template<class T, class... Args>
requires (std::derived_from<T, Div> && std::constructible_from<T, Args...>) |
| T & | add (Args &&... args) |
template<class T>
requires std::derived_from<T, Div> |
| T & | add (unsigned int index, std::shared_ptr< T > child) |
template<class T>
requires std::derived_from<T, Div> |
| T & | add (std::shared_ptr< T > child) |
| void | remove (unsigned int index) |
| void | remove (const std::shared_ptr< Div > &child) |
|
void | remove (const Div &child) |
| void | removeAll () |
| const Div * | at (unsigned int index) const |
| Div * | at (unsigned int index) |
| int | childIndex (const std::shared_ptr< Div > &child) const |
| int | childIndex (const Div *child) const |
| template<class Self> |
| Self & | transition (this Self &self, Property property, const Timing &timing) |
|
template<class Self> |
| Self & | transition (this Self &self, std::initializer_list< Property > properties, const Timing &timing) |
| template<class Self> |
| Self & | row (this Self &self) |
| template<class Self> |
| Self & | column (this Self &self) |
| template<class Self> |
| Self & | size (this Self &self, Length width, Length height) |
| template<class Self> |
| Self & | style (this Self &self, const Style &style) |
| const Style & | style () const |
| const Style & | computedStyle () const |
| Style | targetStyle () const |
| bool | transitioning () const |
|
bool | transitioning (Property property) const |
| void | animate (float from, float to, const Timing &timing, std::function< void(float)> update) |
| template<class Self> |
| Self & | startingClass (this Self &self, detail::StringArg className) |
|
const std::string & | startingClass () const |
| bool | starting () const |
| void | exit (const std::string &className, std::function< void()> done) |
| bool | exiting () const |
| void | cancelExit () |
| bool | subtreeTransitioning () const |
| float | layoutOffsetX () const |
|
float | layoutOffsetY () const |
| bool | layoutSliding () const |
| bool | visible () const |
|
bool | enabled () const |
| template<class Self> |
| Self & | enabled (this Self &self, detail::BoolArg enabled) |
|
virtual bool | active () const |
|
bool | focusEnabled () const |
| template<class Self> |
| Self & | focusEnabled (this Self &self, detail::BoolArg focusEnabled) |
|
bool | hasFocus () const |
| virtual bool | takesEscape () const |
| void | setFocused (bool focused) |
| const std::string & | tooltip () const |
|
template<class Self> |
| Self & | tooltip (this Self &self, const std::string &text) |
| const std::vector< std::shared_ptr< MenuItem > > & | contextMenu () const |
|
template<class Self> |
| Self & | contextMenu (this Self &self, std::vector< std::shared_ptr< MenuItem > > items) |
|
void | localToGlobal (int &gx, int &gy, int x=0, int y=0) const |
|
void | globalToLocal (int &lx, int &ly, int x=0, int y=0) const |
|
int | x () const |
|
int | y () const |
|
int | getWidth () const |
|
int | getHeight () const |
|
int | boundsLeft () const |
|
int | boundsTop () const |
|
int | boundsRight () const |
|
int | boundsBottom () const |
|
int | contentWidth () const |
|
int | contentHeight () const |
|
int | scrollX () const |
|
template<class Self> |
| Self & | scrollX (this Self &self, int scrollX) |
|
int | scrollY () const |
|
template<class Self> |
| Self & | scrollY (this Self &self, int scrollY) |
|
void | scroll (double scrollX, double scrollY) |
| bool | scrollBy (int deltaX, int deltaY) |
| void | scrollIntoView (const SkRect &rect) |
| StyleManager * | styleManager () const |
| void | setStyleManager (std::shared_ptr< StyleManager > styleManager) |
| void | updateStyle () |
| void | updateStyleRecursive () |
| void | updateDirtyStyles () |
| bool | styleDirty () const |
|
const std::vector< std::string > & | tags () const |
|
const std::string & | internalId () const |
|
const std::string & | id () const |
| template<class Self> |
| Self & | id (this Self &self, std::string id) |
|
const std::unordered_set< std::string > & | classNames () const |
| template<class Self> |
| Self & | classNames (this Self &self, const std::unordered_set< std::string > &classNames) |
|
template<class Self> |
| Self & | addClassName (this Self &self, std::string className) |
|
template<class Self> |
| Self & | removeClassName (this Self &self, std::string className) |
| virtual const PropertyMask & | inheritedProperties () const |
|
bool | mouseChildren () const |
| template<class Self> |
| Self & | mouseChildren (this Self &self, detail::BoolArg mouseChildren) |
|
bool | mouseEnabled () const |
| template<class Self> |
| Self & | mouseEnabled (this Self &self, detail::BoolArg mouseEnabled) |
|
bool | mouseOver () const |
|
void | setMouseOver (bool over) |
|
bool | getMouseDown () const |
|
void | setMouseDown (bool down) |
|
bool | contains (float x, float y) const |
|
bool | boundsContains (float x, float y) const |
| virtual MouseEventStatus | handleMouseMove (const MouseEvent &event, bool handled) |
|
virtual bool | handleMouseExit (const MouseEvent &event) |
| virtual MouseEventStatus | handleMouseButtonChange (const MouseEvent &event) |
|
virtual MouseEventStatus | handleMousePress (const MouseEvent &event) |
|
virtual MouseEventStatus | handleMouseRelease (const MouseEvent &event) |
|
virtual MouseEventStatus | handleClick (const MouseEvent &event) |
|
virtual MouseEventStatus | handleDoubleClick (const MouseEvent &event) |
| virtual MouseEventStatus | handleMouseScroll (const MouseEvent &event) |
|
virtual MouseEventStatus | handleContextMenuRequest (const MouseEvent &event) |
| MouseEvent | mouseEventAtCenter () |
| MouseEvent | localMouseEvent (const MouseEvent &event) const |
|
| Observer (const Observer &)=delete |
|
Observer & | operator= (const Observer &)=delete |
|
| Observer (Observer &&)=delete |
|
Observer & | operator= (Observer &&)=delete |
|
|
void | updateColumns (std::vector< DataGridColumn > columns) |
|
void | updateSort (int column, SortOrder order) |
| void | selectionUpdated () override |
| void | cycleSort (int column) |
| void | styleCell (Div &cell, std::size_t column) const |
| void | applySort () |
|
void | updateHeader () |
|
void | updateSelection (SelectableRow *row) |
|
void | updateSelection (int index) |
| virtual bool | selectionFollowsFocus () const |
| virtual bool | handleRowKey (SelectableRow *row, Key key, Mod mod) |
| void | moveTo (SelectableRow *row) |
| void | rowAdded (SelectableRow *row) |
| void | updateTabStop (SelectableRow *row=nullptr) |
| void | forget (SelectableRow *row) |
| void | reorder (Div &container, const std::vector< std::shared_ptr< Div > > &children) |
|
void | updateContextMenu (std::vector< std::shared_ptr< MenuItem > > items) |
| void | setParent (Div *parent) |
| virtual void | added () |
|
virtual void | removed () |
| virtual void | childAdded (Div &child) |
| virtual void | childRemoved (Div &child) |
template<class T>
requires std::derived_from<T, Div> |
| T * | trackChild (std::vector< std::shared_ptr< T > > &list, Div &child) const |
|
virtual void | addedToRender () |
|
virtual void | removedFromRender () |
| std::vector< std::shared_ptr< Div > > | childrenTopmostFirst () const |
| void | invalidateEndChildrenStyle () |
| void | insertChild (unsigned int index, std::shared_ptr< Div > child) |
|
void | updateEnabled (bool enabled) |
|
void | updateId (std::string id) |
|
void | updateClassNames (const std::unordered_set< std::string > &classNames) |
|
void | updateClassName (std::string className, bool present) |
|
void | scrollTo (int scrollX, int scrollY) |
| virtual void | enabledChanged () |
| template<class Self> |
| Self & | tag (this Self &self, std::string tag) |
|
void | addTag (std::string tag) |
| void | updateLayoutSlides (const SlideWalk &walk) |
| void | updateSlidingClass () |
| void | releaseStartingClass () |
| void | finishExit () |
| void | updateTransitions (Style &computed) |
| bool | advanceTransitions (std::chrono::nanoseconds now) |
|
void | finishTransitions () |
| void | cancelTransitions () |
| void | transitionsChanged (const PropertyMask &changed) |
| void | invalidateStyle () |
| void | updateRuntimeStyles () |
| virtual void | createStyles () |
| virtual void | styleUpdated () |
| void | setMeasurable () |
| void | updateLayout (const PropertyMask &changed) |
| virtual void | layoutUpdated () |
|
void | invalidate () |
|
bool | isValid () const |
| virtual Size | measure (Constraint width, Constraint height) |
|
virtual void | render (SkCanvas *canvas) |
|
void | clip (SkCanvas *canvas) |
| virtual void | draw (SkCanvas *canvas) |
| void | drawShadow (SkCanvas *canvas) |
|
void | drawDotGrid (SkCanvas *canvas) |
|
void | drawOutline (SkCanvas *canvas) |
| template<class... T, class F> |
| std::shared_ptr< Slot< T... > > | subscribeTo (Signal< T... > &signal, F &&callback) |
Rows of values in columns under a header row (.header, a tool bar's height, so that its line meets the bars beside the grid), with a single selection (see RowGroup). The rows scroll inside (the .body part, with an overlaid scroll bar) under the header, which stays in view. Clicking a sortable column's header sorts by it, ascending, then descending, then back to the order the rows were added in; its .sort-icon arrow shows the order (faintly, the next one, under the mouse); the title and the arrow are the header cell's .sort button, which takes the focus (Enter or Space sorts). Sorting compares the cells' text, as numbers when both start with one, otherwise without case.
Its events: onSelectionChange/selectionChanged (not onSelect/selected, the rows' state getter) and onSortChange/sortChanged.
auto &grid = add<DataGrid>().columns({{"Name"}, {.title = "Size", .width = 80, .align = TextAlign::End}});
grid.row({"Cue 1", "12"});