|
| 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 39 of file TagsEditor.cpp.
◆ ComboEditor()
ComboEditor::ComboEditor |
( |
const wxArrayString & |
choices, |
|
|
bool |
allowOthers = false |
|
) |
| |
|
inline |
Definition at line 42 of file TagsEditor.cpp.
43 : wxGridCellChoiceEditor(choices, allowOthers)
46 {
47 }
◆ 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 54 of file TagsEditor.cpp.
55 {
56 wxGridCellChoiceEditor::SetParameters(
params);
57
58
59 if (Combo()) {
60 Combo()->Clear();
62 }
63 }
EffectDistortionSettings params
References m_choices, and params.
◆ SetSize()
void ComboEditor::SetSize |
( |
const wxRect & |
rectOrig | ) |
|
|
inlineoverride |
Definition at line 65 of file TagsEditor.cpp.
66 {
67 wxRect rect(rectOrig);
68 wxRect r = Combo()->GetRect();
69
70
71 rect.y -= (r.GetHeight() - rect.GetHeight()) / 2;
72 rect.height = r.GetHeight();
73
74 wxGridCellChoiceEditor::SetSize(rect);
75 }
◆ StartingKey()
virtual void ComboEditor::StartingKey |
( |
wxKeyEvent & |
event | ) |
|
|
inlineoverridevirtual |
Definition at line 79 of file TagsEditor.cpp.
80 {
81
82
83
84
85
86
87
88
89
90
91 wxComboBox * tc = Combo();
92 int ch;
93
94 bool isPrintable;
95
96 #if wxUSE_UNICODE
97 ch = event.GetUnicodeKey();
98 if ( ch != WXK_NONE )
99 isPrintable = true;
100 else
101 #endif
102 {
103 ch = event.GetKeyCode();
104 isPrintable = ch >= WXK_SPACE && ch < WXK_START;
105 }
106
107 switch (ch)
108 {
109 case WXK_DELETE:
110
111 tc->Remove(0, 1);
112 break;
113
114 case WXK_BACK:
115
116 {
117 const long pos = tc->GetLastPosition();
118 tc->Remove(pos - 1, pos);
119 }
120 break;
121
122 default:
123 if ( isPrintable )
124 tc->WriteText(static_cast<wxChar>(ch));
125 break;
126 }
127 }
◆ 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: