Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
PluginDataViewTextRenderer Class Referencefinal
Inheritance diagram for PluginDataViewTextRenderer:
[legend]
Collaboration diagram for PluginDataViewTextRenderer:
[legend]

Public Member Functions

 PluginDataViewTextRenderer ()
 
bool SetValue (const wxVariant &value) override
 
bool GetValue (wxVariant &) const override
 
bool Render (wxRect cell, wxDC *dc, int state) override
 
wxSize GetSize () const override
 
- Public Member Functions inherited from PluginDataViewRenderer
bool ActivateCell (const wxRect &cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned col, const wxMouseEvent *mouseEvent) final
 

Private Attributes

wxString mText
 

Additional Inherited Members

- Protected Member Functions inherited from PluginDataViewRenderer
virtual bool OnCellClicked (const wxRect &cell, wxDataViewModel *model, const wxDataViewItem &item, unsigned col, const wxMouseEvent *mouseEvent)
 

Detailed Description

Definition at line 67 of file PluginDataViewCtrl.cpp.

Constructor & Destructor Documentation

◆ PluginDataViewTextRenderer()

PluginDataViewTextRenderer::PluginDataViewTextRenderer ( )
inline

Definition at line 72 of file PluginDataViewCtrl.cpp.

73 : PluginDataViewRenderer("string", wxDATAVIEW_CELL_ACTIVATABLE)
74 {
75
76 }

Member Function Documentation

◆ GetSize()

wxSize PluginDataViewTextRenderer::GetSize ( ) const
inlineoverride

Definition at line 96 of file PluginDataViewCtrl.cpp.

97 {
98 if(!mText.empty())
99 return GetTextExtent(mText);
100 return GetView()->FromDIP(wxSize(wxDVC_DEFAULT_RENDERER_SIZE,
101 wxDVC_DEFAULT_RENDERER_SIZE));
102 }

References mText.

◆ GetValue()

bool PluginDataViewTextRenderer::GetValue ( wxVariant &  ) const
inlineoverride

Definition at line 84 of file PluginDataViewCtrl.cpp.

85 {
86 return false;
87 }

◆ Render()

bool PluginDataViewTextRenderer::Render ( wxRect  cell,
wxDC *  dc,
int  state 
)
inlineoverride

Definition at line 89 of file PluginDataViewCtrl.cpp.

90 {
91 if(!mText.empty())
92 RenderText(mText, 0, cell, dc, state);
93 return true;
94 }

References mText.

◆ SetValue()

bool PluginDataViewTextRenderer::SetValue ( const wxVariant &  value)
inlineoverride

Definition at line 78 of file PluginDataViewCtrl.cpp.

79 {
80 mText = value.GetString();
81 return true;
82 }

References mText.

Member Data Documentation

◆ mText

wxString PluginDataViewTextRenderer::mText
private

Definition at line 69 of file PluginDataViewCtrl.cpp.

Referenced by GetSize(), Render(), and SetValue().


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