Audacity 3.2.0
Public Member Functions | Protected Member Functions | List of all members
PluginDataViewRenderer Class Reference
Inheritance diagram for PluginDataViewRenderer:
[legend]
Collaboration diagram for PluginDataViewRenderer:
[legend]

Public Member Functions

bool ActivateCell (const wxRect &cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned col, const wxMouseEvent *mouseEvent) final
 

Protected Member Functions

virtual bool OnCellClicked (const wxRect &cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned col, const wxMouseEvent *mouseEvent)
 

Detailed Description

Definition at line 12 of file PluginDataViewCtrl.cpp.

Member Function Documentation

◆ ActivateCell()

bool PluginDataViewRenderer::ActivateCell ( const wxRect &  cell,
wxDataViewModel *  model,
const wxDataViewItem &  item,
unsigned  col,
const wxMouseEvent *  mouseEvent 
)
inlinefinal

Definition at line 17 of file PluginDataViewCtrl.cpp.

22 {
23 if(mouseEvent == nullptr)
24 {
25 wxCHECK(GetView(), false);
26
27 wxVariant value;
28 model->GetValue(value, item, PluginDataModel::ColumnState);
29 value = !value.GetBool();
30
31 wxDataViewItemArray sel;
32 GetView()->GetSelections(sel);
33 if(!sel.empty())
34 {
35 for(const auto& other : sel)
36 model->ChangeValue(value, other, PluginDataModel::ColumnState);
37 }
38 else
39 model->ChangeValue(value, item, PluginDataModel::ColumnState);
40
41 #if wxUSE_ACCESSIBILITY
42 if(const auto ctrl = dynamic_cast<PluginDataViewCtrl*>(GetView()))
43 {
44 wxAccessible::NotifyEvent(
45 wxACC_EVENT_OBJECT_NAMECHANGE,
46 ctrl,
47 wxOBJID_CLIENT,
48 ctrl->GetRowByItem(item) + 1);
49 }
50 #endif
51 return true;
52 }
53 return OnCellClicked(cell, model, item, col, mouseEvent);
54 }
virtual bool OnCellClicked(const wxRect &cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned col, const wxMouseEvent *mouseEvent)

References PluginDataModel::ColumnState, and OnCellClicked().

Here is the call graph for this function:

◆ OnCellClicked()

virtual bool PluginDataViewRenderer::OnCellClicked ( const wxRect &  cell,
wxDataViewModel *  model,
const wxDataViewItem &  item,
unsigned  col,
const wxMouseEvent *  mouseEvent 
)
inlineprotectedvirtual

Reimplemented in PluginDataViewStateRenderer.

Definition at line 57 of file PluginDataViewCtrl.cpp.

62 {
63 return false;
64 }

Referenced by ActivateCell().

Here is the caller graph for this function:

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