|
hydrogen 1.2.3
|
Widget has a list of items associated with a popup which in turn can open dialog windows. More...
#include <WidgetWithHighlightedList.h>
Public Types | |
| enum class | RowSelection { None , Popup , Dialog } |
| Specifies whether the row corresponding to m_nRowClicked should be highlighted and determines the lifecycle of the highlighting. More... | |
Protected Member Functions | |
| WidgetWithHighlightedList () | |
Protected Attributes | |
| int | m_nRowClicked |
| Helper variable remembering for row was clicked last. | |
| RowSelection | m_rowSelection |
| Determines the highlighting of the row associated with m_nRowClicked. | |
Widget has a list of items associated with a popup which in turn can open dialog windows.
Definition at line 30 of file WidgetWithHighlightedList.h.
|
strong |
Specifies whether the row corresponding to m_nRowClicked should be highlighted and determines the lifecycle of the highlighting.
The highlighting starts when the user right-clicks a row and the associated popup window is shown. This will set m_rowSelection to RowSelection::Popup. As soon as the popup get's hidden (by clicking at an arbitrary position), it will be reset to RowSelection::None by a callback. If the user clicks an action of the popup, m_rowSelection will be upgraded to RowSelection::Dialog and set the RowSelection::None once the associated dialog is closed.
This slightly intricate state handling was introduced to ensure the associated row is highlighted whenever a popup and the corresponding dialog is opened. Else, one might very quickly forget whether "Pattern 6" or "Pattern 7" is the target of the delete operation.
| Enumerator | |
|---|---|
| None | No highlighting will be drawn for the row last clicked. |
| Popup | The m_nRowClicked row was right-clicked and a popup dialog did open and is still shown. |
| Dialog | The popup dialog is already closed but the user clicked an associated action and its dialog is still opened. |
Definition at line 52 of file WidgetWithHighlightedList.h.
|
inlineprotected |
Definition at line 70 of file WidgetWithHighlightedList.h.
|
protected |
Helper variable remembering for row was clicked last.
Definition at line 76 of file WidgetWithHighlightedList.h.
|
protected |
Determines the highlighting of the row associated with m_nRowClicked.
Definition at line 80 of file WidgetWithHighlightedList.h.