void CCSMainView::ConstructL() { BaseConstructL( R_WAYFINDER_CS_MAIN_VIEW ); #if defined NAV2_CLIENT_SERIES60_V5 if (Toolbar()) { Toolbar()->SetToolbarObserver( this ); } #endif }
void CSkinManager::RefreshAllSkins(bool bReload) { Combo()->Refresh(); MainFrame()->Refresh(); FavorBar()->Refresh(); MenuBar()->Refresh(); Tab()->Refresh(); Category()->Refresh(); Toolbar()->Refresh(); HelpButton()->Refresh(); LoadButton()->Refresh(); LoginButton()->Refresh(); SepButton()->Refresh(); SettingButton()->Refresh(); BigButton()->Refresh(); SSLLockButton()->Refresh(); StatusBar()->Refresh(); Tooltip()->Refresh(); MenuButton()->Refresh(); LogoButton()->Refresh(); Common()->Refresh(bReload); BackButton()->Refresh(); ForwardButton()->Refresh(); RefreshButton()->Refresh(); CoolMenuSkin()->Refresh(); }
LRESULT CFunctionPage::OnToolbarDropDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) { LPNMTOOLBAR lpnmtb = (LPNMTOOLBAR) pnmh; CMenu Menu = m_FunctionManager.CreateSpecFunctionDropMenu(); CToolBarCtrl Toolbar(lpnmtb->hdr.hwndFrom); CRect r = lpnmtb->rcButton; Toolbar.ClientToScreen(r); Toolbar.Detach(); int ID = Menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RETURNCMD, r.left, r.bottom, m_hWnd); if (!ID) return 0; CAtlArray<MessageStruct*> Messages; VSFunction* pFunc = m_FunctionManager.AddSpecFunction(ID, Messages); if (pFunc) { for (size_t i = 0; i < Messages.GetCount(); i++) { HandlerStruct Handler; if (m_MessageManager.InsertWindowsMessageHandler(Messages[i], Handler)) { AddHandler(&Handler); } } int k = m_Functions.AddString(pFunc->Name); m_Functions.SetItemDataPtr(k, pFunc); } return 0; }
WXMainToolbar(wxFrame *parent) { m_tb = wxXmlResource::Get()->LoadToolBar(parent, "toolbar"); m_idUpdate = XRCID("toolbar_update"); #ifdef __WXGTK3__ gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(Toolbar())), GTK_STYLE_CLASS_PRIMARY_TOOLBAR); SetIcon(0 , "document-open-symbolic"); SetIcon(1 , "document-save-symbolic"); SetIcon(3 , "poedit-validate-symbolic"); SetIcon(4 , "poedit-update-symbolic"); SetIcon(6 , "sidebar-symbolic"); #endif #ifdef __WXMSW__ // De-uglify the toolbar a bit on Windows 10: if (IsWindows10OrGreater()) { if (wxUxThemeIsActive()) { wxUxThemeHandle hTheme(m_tb, L"ExplorerMenu::Toolbar"); m_tb->SetBackgroundColour(wxRGBToColour(::GetThemeSysColor(hTheme, COLOR_WINDOW))); } unsigned padding = PX(4); ::SendMessage((HWND) m_tb->GetHWND(), TB_SETPADDING, 0, MAKELPARAM(padding, padding)); } m_tb->SetDoubleBuffered(true); #endif }
void CTTGPSLoggerViewerView::ConstructL() { BaseConstructL(R_TTGP_VIEW_VIEWER); #ifdef __S60_50__ //RDebug::Print(_L("%d\n"), __LINE__); //RDebug::Print(_L("%d\n"), __LINE__); CAknToolbar* toolbar = Toolbar(); //RDebug::Print(_L("%d\n"), __LINE__); if (toolbar) { //RDebug::Print(_L("%d\n"), __LINE__); toolbar->SetToolbarObserver(this); //RDebug::Print(_L("%d\n"), __LINE__); } else { //RDebug::Print(_L("%d\n"), __LINE__); toolbar = CAknToolbar::NewL(R_TTGP_TOOLBAR_VIEWER); //RDebug::Print(_L("%d\n"), __LINE__); if (toolbar) { //RDebug::Print(_L("%d\n"), __LINE__); SetToolbar(toolbar); //RDebug::Print(_L("%d\n"), __LINE__); toolbar->SetToolbarObserver(this); //RDebug::Print(_L("%d\n"), __LINE__); } } #endif // __S60_50__ }
void CTTGPSLoggerViewerView::OfferToolbarEventL(TInt aCommand) { CAknToolbar* toolbar = Toolbar(); if (toolbar) { HandleCommandL(aCommand); } }
ApplicationView::ApplicationView() { m_workspace = std::make_shared<Workspace>(sf::Vector2f((WindowWidth - 640) / 2.f, 100), sf::Vector2f(640, 480)); m_toolbar = Toolbar(sf::Vector2f(0, 15), sf::Vector2f(float(WindowWidth), 40.f)); m_toolbar.AddButton(std::make_shared<CImageButton>("Assets/Rectangle.png", "Rectangle")); m_toolbar.AddButton(std::make_shared<CImageButton>("Assets/Triangle.png", "Triangle")); m_toolbar.AddButton(std::make_shared<CImageButton>("Assets/Ellipse.png", "Ellipse")); m_toolbar.AddButton(std::make_shared<CImageButton>("Assets/Undo.png", "Undo")); m_toolbar.AddButton(std::make_shared<CImageButton>("Assets/Redo.png", "Redo")); }
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION void SSessionConsoleToolbar::Construct(const FArguments& InArgs, const TSharedRef<FUICommandList>& CommandList) { FSessionConsoleCommands::Register(); // create the toolbar FToolBarBuilder Toolbar(CommandList, FMultiBoxCustomization::None); { Toolbar.AddToolBarButton(FSessionConsoleCommands::Get().SessionCopy); Toolbar.AddSeparator(); Toolbar.AddToolBarButton(FSessionConsoleCommands::Get().Clear); Toolbar.AddToolBarButton(FSessionConsoleCommands::Get().SessionSave); } ChildSlot [ SNew(SBorder) .BorderImage(FEditorStyle::GetBrush("ToolPanel.GroupBorder")) .Padding(0.0f) [ Toolbar.MakeWidget() ] ]; }
void SetIcon(int index, const char *name) { GtkToolItem *i = gtk_toolbar_get_nth_item(Toolbar(), index); gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(i), NULL); gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(i), name); }
void CCSMainView::InitToolbarL() { #if defined NAV2_CLIENT_SERIES60_V5 if (Toolbar()) { CAknButton* button = static_cast<CAknButton*> (Toolbar()->ControlOrNull(EWayFinderCmdButtonFromGps)); if (!button) { HBufC* helpText = CEikonEnv::Static()->AllocReadResourceLC(R_WF_TOOLTIP_SEARCHAROUND); button = // icon, dimmed, pressed, hower CAknButton::NewL(iWayfinderAppUi->iPathManager->GetMbmName(), EMbmWficonsGps_info, EMbmWficonsGps_info_mask, EMbmWficonsGps_info_dimmed, EMbmWficonsGps_info_dimmed_mask, EMbmWficonsGps_info, EMbmWficonsGps_info_mask, EMbmWficonsGps_info, EMbmWficonsGps_info_mask, KNullDesC, *helpText, 0, 0); button->SetIconScaleMode(EAspectRatioPreservedAndUnusedSpaceRemoved); button->AddStateL(iWayfinderAppUi->iPathManager->GetMbmName(), EMbmWficonsGps_info, EMbmWficonsGps_info_mask, EMbmWficonsGps_info_dimmed, EMbmWficonsGps_info_dimmed_mask, EMbmWficonsGps_info, EMbmWficonsGps_info_mask, EMbmWficonsGps_info, EMbmWficonsGps_info_mask, KNullDesC, *helpText, KAknButtonStateHasLatchedFrame, KAknsIIDNone, KAknsIIDNone, KAknsIIDNone, KAknsIIDNone); Toolbar()->AddItemL(button, EAknCtButton, EWayFinderCmdButtonFromGps, 0, 0); CleanupStack::PopAndDestroy(helpText); } iGpsButton = button; if (iSavedData.iUseFromGps ) { button->SetCurrentState(1, ETrue); } else { button->SetCurrentState(0, ETrue); } if ( IsGpsConnectedOrCellidAvailable() ) { button->SetDimmed(EFalse); } else { button->SetDimmed(ETrue); } button->DrawDeferred(); button = static_cast<CAknButton*> (Toolbar()->ControlOrNull(EWayFinderCmdButtonSearch)); if (!button) { HBufC* helpText = CEikonEnv::Static()->AllocReadResourceLC(R_WF_TOOLTIP_MAKESEARCH); button = CAknButton::NewL(iWayfinderAppUi->iPathManager->GetMbmName(), EMbmWficonsSearch, EMbmWficonsSearch_mask, EMbmWficonsSearch, EMbmWficonsSearch_mask, EMbmWficonsSearch, EMbmWficonsSearch_mask, EMbmWficonsSearch, EMbmWficonsSearch_mask, KNullDesC, *helpText, 0, 0); button->SetIconScaleMode(EAspectRatioPreservedAndUnusedSpaceRemoved); Toolbar()->AddItemL(button, EAknCtButton, EWayFinderCmdButtonSearch, 0, 1); CleanupStack::PopAndDestroy(helpText); } button = static_cast<CAknButton*> (Toolbar()->ControlOrNull(EWayFinderCmdButtonCategorySelect)); if (!button) { HBufC* helpText = CEikonEnv::Static()->AllocReadResourceLC(R_WF_TOOLTIP_SELECTCAT); button = CAknButton::NewL(iWayfinderAppUi->iPathManager->GetMbmName(), EMbmWficonsCategory_dash, EMbmWficonsCategory_dash_mask, EMbmWficonsCategory_dash, EMbmWficonsCategory_dash_mask, EMbmWficonsCategory_dash, EMbmWficonsCategory_dash_mask, EMbmWficonsCategory_dash, EMbmWficonsCategory_dash_mask, KNullDesC, *helpText, 0, 0); button->SetIconScaleMode(EAspectRatioPreservedAndUnusedSpaceRemoved); Toolbar()->AddItemL(button, EAknCtButton, EWayFinderCmdButtonCategorySelect, 0, 2); CleanupStack::PopAndDestroy(helpText); } } #endif }