CubicSDR/src/forms/Bookmark/BookmarkView.h

66 lines
2.2 KiB
C
Raw Normal View History

#pragma once
#include "BookmarkPanel.h"
2016-09-14 19:46:57 -04:00
#include "BookmarkMgr.h"
class BookmarkView : public BookmarkPanel {
public:
BookmarkView( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1, -1 ), long style = wxTAB_TRAVERSAL );
void updateActiveList();
2016-10-06 22:27:12 -04:00
void updateBookmarks();
void updateBookmarks(std::string group);
2016-09-28 20:37:39 -04:00
void activeSelection(DemodulatorInstance *dsel);
void bookmarkSelection(BookmarkEntry *bmSel);
void activateBookmark(BookmarkEntry *bmEnt);
void recentSelection(BookmarkEntry *bmSel);
2016-10-06 22:27:12 -04:00
wxTreeItemId refreshBookmarks();
void updateTheme();
2016-10-06 21:08:45 -04:00
void onMenuItem(wxCommandEvent& event);
protected:
2016-09-28 20:37:39 -04:00
void hideProps();
2016-09-14 22:49:32 -04:00
void onUpdateTimer( wxTimerEvent& event );
void doUpdateActiveList();
void onTreeBeginLabelEdit( wxTreeEvent& event );
void onTreeEndLabelEdit( wxTreeEvent& event );
void onTreeActivate( wxTreeEvent& event );
void onTreeCollapse( wxTreeEvent& event );
void onTreeExpanded( wxTreeEvent& event );
2016-10-06 21:08:45 -04:00
void onTreeItemMenu( wxTreeEvent& event );
void onTreeSelect( wxTreeEvent& event );
void onTreeSelectChanging( wxTreeEvent& event );
void onLabelText( wxCommandEvent& event );
void onDoubleClickFreq( wxMouseEvent& event );
void onDoubleClickBandwidth( wxMouseEvent& event );
void onBookmark( wxCommandEvent& event );
void onActivate( wxCommandEvent& event );
void onRemove( wxCommandEvent& event );
2016-09-14 19:46:57 -04:00
wxTreeItemId rootBranch, activeBranch, bookmarkBranch, recentBranch;
2016-10-06 21:08:45 -04:00
// Bookmarks
2016-10-06 22:27:12 -04:00
std::atomic_bool doUpdateBookmarks;
std::set< std::string > doUpdateBookmarkGroup;
2016-10-06 21:08:45 -04:00
BookmarkNames groupNames;
std::map<std::string, wxTreeItemId> groups;
2016-10-06 21:08:45 -04:00
std::map<wxTreeItemId, std::vector<wxTreeItemId> > groupEntries;
2016-10-06 22:27:12 -04:00
std::map<wxTreeItemId, std::vector<BookmarkEntry * > > groupBookmarkEntries;
2016-10-06 21:08:45 -04:00
BookmarkEntry *bookmarkSel;
bool bookmarksInitialized;
2016-10-06 22:27:12 -04:00
2016-10-06 21:08:45 -04:00
// Active
2016-10-06 22:27:12 -04:00
std::atomic_bool doUpdateActive;
std::map<wxTreeItemId, DemodulatorInstance *> activeItems;
2016-09-28 20:37:39 -04:00
DemodulatorInstance *activeSel;
2016-10-06 21:08:45 -04:00
// Recent
std::map<wxTreeItemId, BookmarkEntry *> recentItems;
BookmarkEntry *recentSel;
};