openshot-audio  0.1.6
Public Member Functions | List of all members
TableListBox::Header Class Reference
Inheritance diagram for TableListBox::Header:
TableHeaderComponent AsyncUpdater

Public Member Functions

 Header (TableListBox &tlb)
 
void addMenuItems (PopupMenu &menu, int columnIdClicked)
 
void reactToMenuItem (int menuReturnId, int columnIdClicked)
 
- Public Member Functions inherited from TableHeaderComponent
 TableHeaderComponent ()
 
 ~TableHeaderComponent ()
 
void addColumn (const String &columnName, int columnId, int width, int minimumWidth=30, int maximumWidth=-1, int propertyFlags=defaultFlags, int insertIndex=-1)
 
void removeColumn (int columnIdToRemove)
 
void removeAllColumns ()
 
int getNumColumns (bool onlyCountVisibleColumns) const
 
String getColumnName (int columnId) const
 
void setColumnName (int columnId, const String &newName)
 
void moveColumn (int columnId, int newVisibleIndex)
 
int getColumnWidth (int columnId) const
 
void setColumnWidth (int columnId, int newWidth)
 
void setColumnVisible (int columnId, bool shouldBeVisible)
 
bool isColumnVisible (int columnId) const
 
void setSortColumnId (int columnId, bool sortForwards)
 
int getSortColumnId () const
 
bool isSortedForwards () const
 
void reSortTable ()
 
int getTotalWidth () const
 
int getIndexOfColumnId (int columnId, bool onlyCountVisibleColumns) const
 
int getColumnIdOfIndex (int index, bool onlyCountVisibleColumns) const
 
Rectangle< intgetColumnPosition (int index) const
 
int getColumnIdAtX (int xToFind) const
 
void setStretchToFitActive (bool shouldStretchToFit)
 
bool isStretchToFitActive () const
 
void resizeAllColumnsToFit (int targetTotalWidth)
 
void setPopupMenuActive (bool hasMenu)
 
bool isPopupMenuActive () const
 
String toString () const
 
void restoreFromString (const String &storedVersion)
 
void addListener (Listener *newListener)
 
void removeListener (Listener *listenerToRemove)
 
virtual void columnClicked (int columnId, const ModifierKeys &mods)
 
void paint (Graphics &) override
 
void resized () override
 
void mouseMove (const MouseEvent &) override
 
void mouseEnter (const MouseEvent &) override
 
void mouseExit (const MouseEvent &) override
 
void mouseDown (const MouseEvent &) override
 
void mouseDrag (const MouseEvent &) override
 
void mouseUp (const MouseEvent &) override
 
MouseCursor getMouseCursor () override
 
virtual void showColumnChooserMenu (int columnIdClicked)
 

Additional Inherited Members

- Public Types inherited from TableHeaderComponent
enum  ColumnPropertyFlags {
  visible = 1, resizable = 2, draggable = 4, appearsOnColumnMenu = 8,
  sortable = 16, sortedForwards = 32, sortedBackwards = 64, defaultFlags = (visible | resizable | draggable | appearsOnColumnMenu | sortable),
  notResizable = (visible | draggable | appearsOnColumnMenu | sortable), notResizableOrSortable = (visible | draggable | appearsOnColumnMenu), notSortable = (visible | resizable | draggable | appearsOnColumnMenu)
}
 

Constructor & Destructor Documentation

TableListBox::Header::Header ( TableListBox tlb)
inline

Member Function Documentation

void TableListBox::Header::addMenuItems ( PopupMenu menu,
int  columnIdClicked 
)
inlinevirtual

This can be overridden to add custom items to the pop-up menu.

If you override this, you should call the superclass's method to add its column show/hide items, if you want them on the menu as well.

Then to handle the result, override reactToMenuItem().

See also
reactToMenuItem

Reimplemented from TableHeaderComponent.

void TableListBox::Header::reactToMenuItem ( int  menuReturnId,
int  columnIdClicked 
)
inlinevirtual

Override this to handle any custom items that you have added to the pop-up menu with an addMenuItems() override.

If the menuReturnId isn't one of your own custom menu items, you'll need to call TableHeaderComponent::reactToMenuItem() to allow the base class to handle the items that it had added.

See also
addMenuItems

Reimplemented from TableHeaderComponent.


The documentation for this class was generated from the following file: