#include <src/slic3r/GUI/wxExtensions.hpp>
◆ OnCheckListBoxFunction
| Enumerator |
|---|
| FreeToProceed | |
| RefuseToProceed | |
| WasRefusedLastTime | |
◆ Create()
| bool wxCheckListBoxComboPopup::Create |
( |
wxWindow * |
parent | ) |
|
|
virtual |
177{
178 return wxCheckListBox::Create(parent, wxID_HIGHEST + 1, wxPoint(0, 0));
179}
◆ GetAdjustedSize()
| wxSize wxCheckListBoxComboPopup::GetAdjustedSize |
( |
int |
minWidth, |
|
|
int |
prefHeight, |
|
|
int |
maxHeight |
|
) |
| |
|
virtual |
197{
198
199
200
201 wxComboCtrl* cmb = GetComboCtrl();
202 if (cmb != nullptr) {
203 wxSize
size = GetComboCtrl()->GetSize();
204
205 unsigned int count = GetCount();
206 if (count > 0) {
207 int max_width =
size.x;
208 for (
unsigned int i = 0; i <
count; ++i) {
209 max_width = std::max(max_width, 60 + GetTextExtent(GetString(i)).x);
210 }
211 size.SetWidth(max_width);
212 size.SetHeight(count * cmb->GetCharHeight());
213 }
214 else
216
218 }
219 else
221}
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183
IGL_INLINE void count(const Eigen::SparseMatrix< XType > &X, const int dim, Eigen::SparseVector< SType > &S)
Definition count.cpp:12
References DefaultHeight, and DefaultWidth.
◆ GetControl()
| wxWindow * wxCheckListBoxComboPopup::GetControl |
( |
| ) |
|
|
virtual |
182{
183 return this;
184}
◆ GetStringValue()
| wxString wxCheckListBoxComboPopup::GetStringValue |
( |
| ) |
const |
|
virtual |
◆ OnCheckListBox()
| void wxCheckListBoxComboPopup::OnCheckListBox |
( |
wxCommandEvent & |
evt | ) |
|
◆ OnKeyEvent()
| void wxCheckListBoxComboPopup::OnKeyEvent |
( |
wxKeyEvent & |
evt | ) |
|
|
virtual |
224{
225
226 switch (evt.GetKeyCode())
227 {
228 case WXK_LEFT:
229 case WXK_UP:
230 case WXK_RIGHT:
231 case WXK_DOWN:
232 case WXK_PAGEUP:
233 case WXK_PAGEDOWN:
234 case WXK_END:
235 case WXK_HOME:
236 case WXK_NUMPAD_LEFT:
237 case WXK_NUMPAD_UP:
238 case WXK_NUMPAD_RIGHT:
239 case WXK_NUMPAD_DOWN:
240 case WXK_NUMPAD_PAGEUP:
241 case WXK_NUMPAD_PAGEDOWN:
242 case WXK_NUMPAD_END:
243 case WXK_NUMPAD_HOME:
244 {
245 break;
246 }
247 default:
248 {
249 evt.Skip();
250 break;
251 }
252 }
253}
Referenced by Slic3r::GUI::create_combochecklist().
◆ OnListBoxSelection()
| void wxCheckListBoxComboPopup::OnListBoxSelection |
( |
wxCommandEvent & |
evt | ) |
|
283{
284
285
286 int selId = GetSelection();
287 if (selId != wxNOT_FOUND)
288 {
289 #ifndef _WIN32
291 #endif
292 Check((unsigned int)selId, !IsChecked((unsigned int)selId));
293
295
296 SetSelection(wxNOT_FOUND);
297 wxCommandEvent event(wxEVT_CHECKLISTBOX, GetId());
298 event.SetInt(selId);
299 event.SetEventObject(this);
300 ProcessEvent(event);
301 }
302}
References FreeToProceed, m_check_box_events_status, and RefuseToProceed.
Referenced by Slic3r::GUI::create_combochecklist().
◆ SetStringValue()
| void wxCheckListBoxComboPopup::SetStringValue |
( |
const wxString & |
value | ) |
|
|
virtual |
◆ DefaultHeight
| const unsigned int wxCheckListBoxComboPopup::DefaultHeight = 200 |
|
staticprivate |
◆ DefaultWidth
| const unsigned int wxCheckListBoxComboPopup::DefaultWidth = 200 |
|
staticprivate |
◆ m_check_box_events_status
◆ m_text
| wxString wxCheckListBoxComboPopup::m_text |
|
private |
The documentation for this class was generated from the following files: