KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LISTBOX_TRICKS Class Reference

#include <listbox_tricks.h>

Inheritance diagram for LISTBOX_TRICKS:

Public Types

enum  MENU_ID {
  ID_COPY = wxID_HIGHEST + 1 , ID_CUT , ID_PASTE , ID_DELETE ,
  ID_DUPLICATE
}
 These are the ids for the menu. More...
 

Public Member Functions

 LISTBOX_TRICKS (wxWindow &aWindow, wxListBox &aListBox)
 
 ~LISTBOX_TRICKS ()
 
void SetMenuLabels (const std::map< MENU_ID, wxString > &aItems)
 

Private Member Functions

void OnListBoxCopy (wxCommandEvent &aEvent)
 
void OnListBoxCut (wxCommandEvent &aEvent)
 
void OnListBoxPaste (wxCommandEvent &aEvent)
 
void OnListBoxDelete (wxCommandEvent &aEvent)
 
void OnListBoxDuplicate (wxCommandEvent &aEvent)
 
void OnListBoxRDown (wxMouseEvent &aEvent)
 
void OnListBoxKeyDown (wxKeyEvent &aEvent)
 
void listBoxCopy ()
 
void listBoxCut ()
 
void listBoxPaste ()
 
wxArrayString listBoxGetSelected () const
 
wxArrayInt listBoxDeleteSelected ()
 Delete the selected filters.
 
void listBoxDuplicateSelected ()
 Duplicate the selected filters.
 

Private Attributes

std::map< MENU_ID, wxString > m_menuStrings
 
wxWindow & m_parent
 
wxListBox & m_listBox
 

Detailed Description

Definition at line 45 of file listbox_tricks.h.

Member Enumeration Documentation

◆ MENU_ID

These are the ids for the menu.

Enumerator
ID_COPY 
ID_CUT 
ID_PASTE 
ID_DELETE 
ID_DUPLICATE 

Definition at line 54 of file listbox_tricks.h.

Constructor & Destructor Documentation

◆ LISTBOX_TRICKS()

LISTBOX_TRICKS::LISTBOX_TRICKS ( wxWindow &  aWindow,
wxListBox &  aListBox 
)

◆ ~LISTBOX_TRICKS()

LISTBOX_TRICKS::~LISTBOX_TRICKS ( )

Member Function Documentation

◆ listBoxCopy()

void LISTBOX_TRICKS::listBoxCopy ( )
private

Definition at line 148 of file listbox_tricks.cpp.

References filter, and listBoxGetSelected().

Referenced by listBoxCut(), OnListBoxCopy(), and OnListBoxKeyDown().

◆ listBoxCut()

void LISTBOX_TRICKS::listBoxCut ( )
private

Definition at line 202 of file listbox_tricks.cpp.

References listBoxCopy(), listBoxDeleteSelected(), and m_listBox.

Referenced by OnListBoxCut(), and OnListBoxKeyDown().

◆ listBoxDeleteSelected()

wxArrayInt LISTBOX_TRICKS::listBoxDeleteSelected ( )
private

Delete the selected filters.

Returns the indexes of the deleted filters (which won't be valid anymore).

Definition at line 95 of file listbox_tricks.cpp.

References m_listBox.

Referenced by listBoxCut(), OnListBoxDelete(), and OnListBoxKeyDown().

◆ listBoxDuplicateSelected()

void LISTBOX_TRICKS::listBoxDuplicateSelected ( )
private

Duplicate the selected filters.

Definition at line 127 of file listbox_tricks.cpp.

References filter, and m_listBox.

Referenced by OnListBoxDuplicate(), and OnListBoxKeyDown().

◆ listBoxGetSelected()

wxArrayString LISTBOX_TRICKS::listBoxGetSelected ( ) const
private

Definition at line 114 of file listbox_tricks.cpp.

References m_listBox.

Referenced by listBoxCopy().

◆ listBoxPaste()

void LISTBOX_TRICKS::listBoxPaste ( )
private

Definition at line 166 of file listbox_tricks.cpp.

References m_listBox, and text.

Referenced by OnListBoxKeyDown(), and OnListBoxPaste().

◆ OnListBoxCopy()

void LISTBOX_TRICKS::OnListBoxCopy ( wxCommandEvent &  aEvent)
private

Definition at line 290 of file listbox_tricks.cpp.

References listBoxCopy().

Referenced by LISTBOX_TRICKS(), and ~LISTBOX_TRICKS().

◆ OnListBoxCut()

void LISTBOX_TRICKS::OnListBoxCut ( wxCommandEvent &  aEvent)
private

Definition at line 296 of file listbox_tricks.cpp.

References listBoxCut().

Referenced by LISTBOX_TRICKS(), and ~LISTBOX_TRICKS().

◆ OnListBoxDelete()

void LISTBOX_TRICKS::OnListBoxDelete ( wxCommandEvent &  aEvent)
private

Definition at line 284 of file listbox_tricks.cpp.

References listBoxDeleteSelected().

Referenced by LISTBOX_TRICKS(), and ~LISTBOX_TRICKS().

◆ OnListBoxDuplicate()

void LISTBOX_TRICKS::OnListBoxDuplicate ( wxCommandEvent &  aEvent)
private

Definition at line 308 of file listbox_tricks.cpp.

References listBoxDuplicateSelected().

Referenced by LISTBOX_TRICKS(), and ~LISTBOX_TRICKS().

◆ OnListBoxKeyDown()

void LISTBOX_TRICKS::OnListBoxKeyDown ( wxKeyEvent &  aEvent)
private

◆ OnListBoxPaste()

void LISTBOX_TRICKS::OnListBoxPaste ( wxCommandEvent &  aEvent)
private

Definition at line 302 of file listbox_tricks.cpp.

References listBoxPaste().

Referenced by LISTBOX_TRICKS(), and ~LISTBOX_TRICKS().

◆ OnListBoxRDown()

void LISTBOX_TRICKS::OnListBoxRDown ( wxMouseEvent &  aEvent)
private

◆ SetMenuLabels()

void LISTBOX_TRICKS::SetMenuLabels ( const std::map< MENU_ID, wxString > &  aItems)

Definition at line 86 of file listbox_tricks.cpp.

References m_menuStrings.

Member Data Documentation

◆ m_listBox

wxListBox& LISTBOX_TRICKS::m_listBox
private

◆ m_menuStrings

std::map<MENU_ID, wxString> LISTBOX_TRICKS::m_menuStrings
private

Definition at line 95 of file listbox_tricks.h.

Referenced by LISTBOX_TRICKS(), OnListBoxRDown(), and SetMenuLabels().

◆ m_parent

wxWindow& LISTBOX_TRICKS::m_parent
private

Definition at line 97 of file listbox_tricks.h.

Referenced by OnListBoxRDown().


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