mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-05 15:35:01 -04:00
Status/tootips additions: Gain, Bookmarks. Fix Bookmark mousewheel handling (for Windows <= 7) for the tree view
This commit is contained in:
@@ -89,7 +89,12 @@ BookmarkPanel::BookmarkPanel( wxWindow* parent, wxWindowID id, const wxPoint& po
|
||||
m_searchText->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( BookmarkPanel::onSearchTextFocus ), NULL, this );
|
||||
m_searchText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BookmarkPanel::onSearchText ), NULL, this );
|
||||
m_clearSearchButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BookmarkPanel::onClearSearch ), NULL, this );
|
||||
m_treeView->Connect( wxEVT_MOTION, wxMouseEventHandler( BookmarkPanel::onMotion ), NULL, this );
|
||||
|
||||
//VSO: Added m_treeView wxEVT_ENTER_WINDOW/wxEVT_LEAVE_WINDOW that was missing.
|
||||
m_treeView->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(BookmarkPanel::onEnterWindow), NULL, this);
|
||||
m_treeView->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(BookmarkPanel::onLeaveWindow), NULL, this);
|
||||
|
||||
m_treeView->Connect( wxEVT_MOTION, wxMouseEventHandler( BookmarkPanel::onMotion ), NULL, this );
|
||||
m_treeView->Connect( wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeBeginDrag ), NULL, this );
|
||||
m_treeView->Connect( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEventHandler( BookmarkPanel::onTreeBeginLabelEdit ), NULL, this );
|
||||
m_treeView->Connect( wxEVT_COMMAND_TREE_END_DRAG, wxTreeEventHandler( BookmarkPanel::onTreeEndDrag ), NULL, this );
|
||||
|
||||
@@ -1429,10 +1429,12 @@ void BookmarkView::onEnterWindow( wxMouseEvent& event ) {
|
||||
|
||||
#ifdef _WIN32
|
||||
if (wxGetApp().getAppFrame()->canFocus()) {
|
||||
this->SetFocus();
|
||||
//make mousewheel work in the tree view.
|
||||
m_treeView->SetFocus();
|
||||
}
|
||||
#endif
|
||||
|
||||
setStatusText("You can mouse-drag a bookmark entry from one category to the next..etc. TODO: add more Bookmarks descriptions");
|
||||
}
|
||||
|
||||
|
||||
@@ -1450,10 +1452,15 @@ void BookmarkView::onMotion( wxMouseEvent& event ) {
|
||||
if (visualDragItem != nullptr) {
|
||||
visualDragItem->SetPosition(pos);
|
||||
}
|
||||
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BookmarkView::setStatusText(std::string statusText) {
|
||||
//make tooltips active on the tree view.
|
||||
wxGetApp().getAppFrame()->setStatusText(m_treeView, statusText);
|
||||
}
|
||||
|
||||
TreeViewItem *BookmarkView::itemToTVI(wxTreeItemId item) {
|
||||
TreeViewItem* tvi = nullptr;
|
||||
|
||||
|
||||
@@ -138,8 +138,7 @@ protected:
|
||||
void onRenameRange( wxCommandEvent& event );
|
||||
void onActivateRange( wxCommandEvent& event );
|
||||
void onUpdateRange( wxCommandEvent& event );
|
||||
|
||||
|
||||
|
||||
TreeViewItem *itemToTVI(wxTreeItemId item);
|
||||
|
||||
MouseTracker mouseTracker;
|
||||
@@ -172,4 +171,6 @@ protected:
|
||||
|
||||
// Search
|
||||
std::vector<std::wstring> searchKeywords;
|
||||
|
||||
void setStatusText(std::string statusText);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user