2016-09-13 22:59:21 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// C++ code generated with wxFormBuilder (version Aug 23 2015)
|
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "BookmarkPanel.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
BookmarkPanel::BookmarkPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
|
|
|
|
{
|
|
|
|
wxBoxSizer* bSizer1;
|
|
|
|
bSizer1 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2016-10-13 00:41:35 -04:00
|
|
|
m_treeView = new wxTreeCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_EDIT_LABELS|wxTR_HAS_VARIABLE_ROW_HEIGHT|wxTR_HIDE_ROOT|wxTR_SINGLE );
|
2016-09-13 22:59:21 -04:00
|
|
|
bSizer1->Add( m_treeView, 5, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_propPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxFlexGridSizer* fgPropSizer;
|
|
|
|
fgPropSizer = new wxFlexGridSizer( 0, 2, 0, 0 );
|
|
|
|
fgPropSizer->AddGrowableCol( 1 );
|
|
|
|
fgPropSizer->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgPropSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
2016-09-28 20:37:39 -04:00
|
|
|
m_labelLabel = new wxStaticText( m_propPanel, wxID_ANY, wxT("Label"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_labelLabel->Wrap( -1 );
|
|
|
|
fgPropSizer->Add( m_labelLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_labelText = new wxTextCtrl( m_propPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2016-09-14 22:10:27 -04:00
|
|
|
fgPropSizer->Add( m_labelText, 0, wxALL|wxEXPAND, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_frequencyLabel = new wxStaticText( m_propPanel, wxID_ANY, wxT("Freq"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_frequencyLabel->Wrap( -1 );
|
2016-09-14 22:10:27 -04:00
|
|
|
fgPropSizer->Add( m_frequencyLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_frequencyVal = new wxStaticText( m_propPanel, wxID_ANY, wxT("FrequencyVal"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_frequencyVal->Wrap( -1 );
|
|
|
|
fgPropSizer->Add( m_frequencyVal, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
m_bandwidthLabel = new wxStaticText( m_propPanel, wxID_ANY, wxT("BW"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_bandwidthLabel->Wrap( -1 );
|
2016-09-14 22:10:27 -04:00
|
|
|
fgPropSizer->Add( m_bandwidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_bandwidthVal = new wxStaticText( m_propPanel, wxID_ANY, wxT("BandwidthVal"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_bandwidthVal->Wrap( -1 );
|
|
|
|
fgPropSizer->Add( m_bandwidthVal, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
m_modulationLabel = new wxStaticText( m_propPanel, wxID_ANY, wxT("Type"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_modulationLabel->Wrap( -1 );
|
2016-09-14 22:10:27 -04:00
|
|
|
fgPropSizer->Add( m_modulationLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
2016-09-28 20:37:39 -04:00
|
|
|
m_modulationVal = new wxStaticText( m_propPanel, wxID_ANY, wxT("TypeVal"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_modulationVal->Wrap( -1 );
|
|
|
|
fgPropSizer->Add( m_modulationVal, 0, wxALL, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
m_propPanel->SetSizer( fgPropSizer );
|
|
|
|
m_propPanel->Layout();
|
|
|
|
fgPropSizer->Fit( m_propPanel );
|
|
|
|
bSizer1->Add( m_propPanel, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
|
|
|
|
|
|
|
m_bookmarkButton = new wxButton( this, wxID_ANY, wxT("Bookmark"), wxDefaultPosition, wxDefaultSize, 0 );
|
2016-09-29 21:57:23 -04:00
|
|
|
bSizer1->Add( m_bookmarkButton, 0, wxEXPAND, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_activateButton = new wxButton( this, wxID_ANY, wxT("Activate"), wxDefaultPosition, wxDefaultSize, 0 );
|
2016-09-29 21:57:23 -04:00
|
|
|
bSizer1->Add( m_activateButton, 0, wxEXPAND, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
m_removeButton = new wxButton( this, wxID_ANY, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
2016-09-29 21:57:23 -04:00
|
|
|
bSizer1->Add( m_removeButton, 0, wxEXPAND, 5 );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bSizer1 );
|
|
|
|
this->Layout();
|
2016-09-14 22:49:32 -04:00
|
|
|
m_updateTimer.SetOwner( this, wxID_ANY );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
// Connect Events
|
2016-10-13 00:41:35 -04:00
|
|
|
this->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( BookmarkPanel::onEnterWindow ) );
|
|
|
|
this->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BookmarkPanel::onLeaveWindow ) );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeBeginDrag ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEventHandler( BookmarkPanel::onTreeBeginLabelEdit ), NULL, this );
|
2016-10-13 00:41:35 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEventHandler( BookmarkPanel::onTreeDeleteItem ), NULL, this );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_END_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeEndDrag ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_END_LABEL_EDIT, wxTreeEventHandler( BookmarkPanel::onTreeEndLabelEdit ), NULL, this );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( BookmarkPanel::onTreeActivate ), NULL, this );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxTreeEventHandler( BookmarkPanel::onTreeCollapse ), NULL, this );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEventHandler( BookmarkPanel::onTreeExpanded ), NULL, this );
|
2016-10-13 00:41:35 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEventHandler( BookmarkPanel::onTreeItemGetTooltip ), NULL, this );
|
2016-10-06 21:08:45 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEventHandler( BookmarkPanel::onTreeItemMenu ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( BookmarkPanel::onTreeSelect ), NULL, this );
|
|
|
|
m_treeView->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( BookmarkPanel::onTreeSelectChanging ), NULL, this );
|
|
|
|
m_labelText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BookmarkPanel::onLabelText ), NULL, this );
|
2016-09-29 20:47:38 -04:00
|
|
|
m_frequencyVal->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( BookmarkPanel::onDoubleClickFreq ), NULL, this );
|
|
|
|
m_bandwidthVal->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( BookmarkPanel::onDoubleClickBandwidth ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_bookmarkButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onBookmark ), NULL, this );
|
|
|
|
m_activateButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onActivate ), NULL, this );
|
|
|
|
m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onRemove ), NULL, this );
|
2016-09-14 22:49:32 -04:00
|
|
|
this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( BookmarkPanel::onUpdateTimer ) );
|
2016-09-13 22:59:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
BookmarkPanel::~BookmarkPanel()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2016-10-13 00:41:35 -04:00
|
|
|
this->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( BookmarkPanel::onEnterWindow ) );
|
|
|
|
this->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BookmarkPanel::onLeaveWindow ) );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeBeginDrag ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEventHandler( BookmarkPanel::onTreeBeginLabelEdit ), NULL, this );
|
2016-10-13 00:41:35 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEventHandler( BookmarkPanel::onTreeDeleteItem ), NULL, this );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_END_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeEndDrag ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_END_LABEL_EDIT, wxTreeEventHandler( BookmarkPanel::onTreeEndLabelEdit ), NULL, this );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( BookmarkPanel::onTreeActivate ), NULL, this );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxTreeEventHandler( BookmarkPanel::onTreeCollapse ), NULL, this );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEventHandler( BookmarkPanel::onTreeExpanded ), NULL, this );
|
2016-10-13 00:41:35 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEventHandler( BookmarkPanel::onTreeItemGetTooltip ), NULL, this );
|
2016-10-06 21:08:45 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEventHandler( BookmarkPanel::onTreeItemMenu ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( BookmarkPanel::onTreeSelect ), NULL, this );
|
|
|
|
m_treeView->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEventHandler( BookmarkPanel::onTreeSelectChanging ), NULL, this );
|
|
|
|
m_labelText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BookmarkPanel::onLabelText ), NULL, this );
|
2016-09-29 20:47:38 -04:00
|
|
|
m_frequencyVal->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( BookmarkPanel::onDoubleClickFreq ), NULL, this );
|
|
|
|
m_bandwidthVal->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( BookmarkPanel::onDoubleClickBandwidth ), NULL, this );
|
2016-09-13 22:59:21 -04:00
|
|
|
m_bookmarkButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onBookmark ), NULL, this );
|
|
|
|
m_activateButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onActivate ), NULL, this );
|
|
|
|
m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onRemove ), NULL, this );
|
2016-09-14 22:49:32 -04:00
|
|
|
this->Disconnect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( BookmarkPanel::onUpdateTimer ) );
|
2016-09-13 22:59:21 -04:00
|
|
|
|
|
|
|
}
|