void HexView_CursorChanged(HWND hwndMain, HWND hwndHV) { MAINWND *mainWnd = (MAINWND *)GetWindowLongPtr(hwndMain, 0); UpdateStatusBarText(mainWnd->hwndStatusBar, hwndHV); UpdateToolbarState(mainWnd->hwndStatusBar, hwndHV); }
void CToolBar::OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString&, const void*) { switch (notification) { case STATECHANGE_CHANGEDCONTEXT: case STATECHANGE_SERVER: case STATECHANGE_REMOTE_IDLE: UpdateToolbarState(); break; case STATECHANGE_QUEUEPROCESSING: { const bool check = m_pMainFrame->GetQueue() && m_pMainFrame->GetQueue()->IsActive() != 0; ToggleTool(XRCID("ID_TOOLBAR_PROCESSQUEUE"), check); } break; case STATECHANGE_SYNC_BROWSE: { bool is_sync_browse = pState && pState->GetSyncBrowse(); ToggleTool(XRCID("ID_TOOLBAR_SYNCHRONIZED_BROWSING"), is_sync_browse); } break; case STATECHANGE_COMPARISON: { bool is_comparing = pState && pState->GetComparisonManager()->IsComparing(); ToggleTool(XRCID("ID_TOOLBAR_COMPARISON"), is_comparing); } break; case STATECHANGE_APPLYFILTER: ToggleTool(XRCID("ID_TOOLBAR_FILTER"), CFilterManager::HasActiveFilters()); break; default: break; } }
INT_PTR CManageBookmarksDialog::OnInitDialog() { /* TODO: Enable drag and drop for listview and treeview. */ SetDialogIcon(); SetupSearchField(); SetupToolbar(); SetupTreeView(); SetupListView(); CBookmarkItemNotifier::GetInstance().AddObserver(this); UpdateToolbarState(); SetFocus(GetDlgItem(m_hDlg,IDC_MANAGEBOOKMARKS_LISTVIEW)); return 0; }
void CManageBookmarksDialog::BrowseBookmarkFolder(const CBookmarkFolder &BookmarkFolder) { /* Temporary flag used to indicate whether history should be saved. It will be reset each time a folder is browsed. */ if(m_bSaveHistory) { m_stackBack.push(m_guidCurrentFolder); } m_bSaveHistory = true; m_guidCurrentFolder = BookmarkFolder.GetGUID(); m_pBookmarkTreeView->SelectFolder(BookmarkFolder.GetGUID()); m_pBookmarkListView->InsertBookmarksIntoListView(BookmarkFolder); UpdateToolbarState(); }
LONG HexViewNotifyHandler(MAINWND *mainWnd, HWND hwnd, NMHDR *hdr) { HWND hwndHV = GetActiveHexView(hwnd);//g_hwndHexView; NMHVPROGRESS *hvp; switch(hdr->code) { case HVN_CHANGED: mainWnd->fChanged = TRUE; UpdateToolbarState(mainWnd->hwndToolbar, hwndHV); if(g_szFileTitle[0]) { BOOL fModified = HexView_CanUndo(hwndHV); if(fModified != g_fFileChanged) { SetWindowFileName(hwnd, g_szFileTitle, fModified, FALSE); g_fFileChanged = fModified; } } UpdateTypeView(); return 0; case HVN_EDITMODE_CHANGE: // show the unicode value under the cursor //SetStatusBarText(g_hwndStatusbar, 1, 0, TEXT(" U+%04X"), // TextView_GetCurChar(g_hwndTextView) ); UpdateStatusBarText(mainWnd->hwndStatusBar, hwndHV); //SetStatusBarText(mainWnd->hwndStatusBar, 4, 0, // g_szEditMode[HexView_GetEditMode(hwndHV)] ); return 0; case HVN_CURSOR_CHANGE: UpdateStatusBarText(mainWnd->hwndStatusBar, hwndHV); UpdateToolbarState(mainWnd->hwndStatusBar, hwndHV); UpdateTypeView(); return 0; case HVN_PROGRESS: hvp = (NMHVPROGRESS *)hdr; return UpdateProgress(mainWnd, TRUE, hvp->pos, hvp->len); //return 0; case HVN_BOOKCLOSE: //HexView_DelBookmark(((NMHVBOOKMARK *)hdr)->hdr.hwndFrom, 0); //RemoveBookmark((NMHVBOOKMARK *)hdr); return 0; default: return 0; } }