OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
wxDataViewTreeCtrlComboPopup Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/wxExtensions.hpp>

Inheritance diagram for wxDataViewTreeCtrlComboPopup:
Collaboration diagram for wxDataViewTreeCtrlComboPopup:

Public Member Functions

virtual bool Create (wxWindow *parent)
virtual wxWindow * GetControl ()
virtual void SetStringValue (const wxString &value)
virtual wxString GetStringValue () const
virtual void OnKeyEvent (wxKeyEvent &evt)
void OnDataViewTreeCtrlSelection (wxCommandEvent &evt)
void SetItemsCnt (int cnt)

Private Attributes

wxString m_text
int m_cnt_open_items {0}

Static Private Attributes

static const unsigned int DefaultWidth = 270
static const unsigned int DefaultHeight = 200
static const unsigned int DefaultItemHeight = 22

Detailed Description

Member Function Documentation

◆ Create()

bool wxDataViewTreeCtrlComboPopup::Create ( wxWindow * parent)
virtual
348{
349 return wxDataViewTreeCtrl::Create(parent, wxID_ANY/*HIGHEST + 1*/, wxPoint(0, 0), wxDefaultSize/*wxSize(270, -1)*/, wxDV_NO_HEADER);
350}

◆ GetControl()

virtual wxWindow * wxDataViewTreeCtrlComboPopup::GetControl ( )
inlinevirtual
152{ return this; }

◆ GetStringValue()

virtual wxString wxDataViewTreeCtrlComboPopup::GetStringValue ( ) const
inlinevirtual
154{ return m_text; }
wxString m_text
Definition wxExtensions.hpp:147

References m_text.

◆ OnDataViewTreeCtrlSelection()

void wxDataViewTreeCtrlComboPopup::OnDataViewTreeCtrlSelection ( wxCommandEvent & evt)
390{
391 wxComboCtrl* cmb = GetComboCtrl();
392 auto selected = GetItemText(GetSelection());
393 cmb->SetText(selected);
394}

◆ OnKeyEvent()

void wxDataViewTreeCtrlComboPopup::OnKeyEvent ( wxKeyEvent & evt)
virtual
372{
373 // filters out all the keys which are not working properly
374 if (evt.GetKeyCode() == WXK_UP)
375 {
376 return;
377 }
378 else if (evt.GetKeyCode() == WXK_DOWN)
379 {
380 return;
381 }
382 else
383 {
384 evt.Skip();
385 return;
386 }
387}

◆ SetItemsCnt()

void wxDataViewTreeCtrlComboPopup::SetItemsCnt ( int cnt)
inline
159{ m_cnt_open_items = cnt; }
int m_cnt_open_items
Definition wxExtensions.hpp:148

References m_cnt_open_items.

◆ SetStringValue()

virtual void wxDataViewTreeCtrlComboPopup::SetStringValue ( const wxString & value)
inlinevirtual
153{ m_text = value; }

References m_text.

Member Data Documentation

◆ DefaultHeight

const unsigned int wxDataViewTreeCtrlComboPopup::DefaultHeight = 200
staticprivate

◆ DefaultItemHeight

const unsigned int wxDataViewTreeCtrlComboPopup::DefaultItemHeight = 22
staticprivate

◆ DefaultWidth

const unsigned int wxDataViewTreeCtrlComboPopup::DefaultWidth = 270
staticprivate

◆ m_cnt_open_items

int wxDataViewTreeCtrlComboPopup::m_cnt_open_items {0}
private
148{0};

Referenced by SetItemsCnt().

◆ m_text

wxString wxDataViewTreeCtrlComboPopup::m_text
private

Referenced by GetStringValue(), and SetStringValue().


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