|
| ComboEditor (const wxArrayString &choices, bool allowOthers=false) |
|
void | PaintBackground (wxDC &, const wxRect &WXUNUSED(rectCell), const wxGridCellAttr &WXUNUSED(attr)) override |
|
void | SetParameters (const wxString ¶ms) override |
|
void | SetSize (const wxRect &rectOrig) override |
|
virtual void | StartingKey (wxKeyEvent &event) override |
|
wxGridCellEditor * | Clone () const override |
|
Definition at line 40 of file TagsEditor.cpp.
◆ ComboEditor()
ComboEditor::ComboEditor |
( |
const wxArrayString & |
choices, |
|
|
bool |
allowOthers = false |
|
) |
| |
|
inline |
Definition at line 43 of file TagsEditor.cpp.
44 : wxGridCellChoiceEditor(choices, allowOthers)
47 {
48 }
◆ Clone()
wxGridCellEditor * ComboEditor::Clone |
( |
| ) |
const |
|
inlineoverride |
◆ PaintBackground()
void ComboEditor::PaintBackground |
( |
wxDC & |
, |
|
|
const wxRect & |
WXUNUSEDrectCell, |
|
|
const wxGridCellAttr & |
WXUNUSEDattr |
|
) |
| |
|
inlineoverride |
◆ SetParameters()
void ComboEditor::SetParameters |
( |
const wxString & |
params | ) |
|
|
inlineoverride |
Definition at line 55 of file TagsEditor.cpp.
56 {
57 wxGridCellChoiceEditor::SetParameters(
params);
58
59
60 if (Combo()) {
61 Combo()->Clear();
63 }
64 }
EffectDistortionSettings params
References m_choices, and params.
◆ SetSize()
void ComboEditor::SetSize |
( |
const wxRect & |
rectOrig | ) |
|
|
inlineoverride |
Definition at line 66 of file TagsEditor.cpp.
67 {
68 wxRect rect(rectOrig);
69 wxRect r = Combo()->GetRect();
70
71
72 rect.y -= (r.GetHeight() - rect.GetHeight()) / 2;
73 rect.height = r.GetHeight();
74
75 wxGridCellChoiceEditor::SetSize(rect);
76 }
◆ StartingKey()
virtual void ComboEditor::StartingKey |
( |
wxKeyEvent & |
event | ) |
|
|
inlineoverridevirtual |
Definition at line 80 of file TagsEditor.cpp.
81 {
82
83
84
85
86
87
88
89
90
91
92 wxComboBox * tc = Combo();
93 int ch;
94
95 bool isPrintable;
96
97 #if wxUSE_UNICODE
98 ch = event.GetUnicodeKey();
99 if ( ch != WXK_NONE )
100 isPrintable = true;
101 else
102 #endif
103 {
104 ch = event.GetKeyCode();
105 isPrintable = ch >= WXK_SPACE && ch < WXK_START;
106 }
107
108 switch (ch)
109 {
110 case WXK_DELETE:
111
112 tc->Remove(0, 1);
113 break;
114
115 case WXK_BACK:
116
117 {
118 const long pos = tc->GetLastPosition();
119 tc->Remove(pos - 1, pos);
120 }
121 break;
122
123 default:
124 if ( isPrintable )
125 tc->WriteText(static_cast<wxChar>(ch));
126 break;
127 }
128 }
◆ m_allowOthers
bool ComboEditor::m_allowOthers |
|
private |
◆ m_choices
wxArrayString ComboEditor::m_choices |
|
private |
The documentation for this class was generated from the following file: