SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent) { // Set Window Properties setWindowTitle(tr("Settings")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); // Main Layout QVBoxLayout* layout = new QVBoxLayout; // Add content to layout before dialog buttons. m_tabs = new ListTabWidget(); layout->addWidget(m_tabs); AddTab(m_tabs, tr("General"), new GeneralPane(), "config"); AddTab(m_tabs, tr("Interface"), new InterfacePane(), "browse"); auto* audio_pane = new AudioPane; m_audio_pane_index = AddTab(m_tabs, tr("Audio"), audio_pane, "play"); AddTab(m_tabs, tr("Paths"), new PathPane(), "browse"); connect(this, &SettingsWindow::EmulationStarted, [audio_pane] { audio_pane->OnEmulationStateChanged(true); }); connect(this, &SettingsWindow::EmulationStopped, [audio_pane] { audio_pane->OnEmulationStateChanged(false); }); // Dialog box buttons QDialogButtonBox* ok_box = new QDialogButtonBox(QDialogButtonBox::Ok); connect(ok_box, &QDialogButtonBox::accepted, this, &SettingsWindow::accept); layout->addWidget(ok_box); setLayout(layout); }
void TVideoSettingsTabView::Init() { BMessage *theMessage = NULL; // // Create all the tab views // // Get VideoCompressionView from resource BTab *compressionTab = new BTab(); theMessage = GetWindowFromResource("VideoCompressionView"); ASSERT(theMessage); m_CompressionView = new TVideoCompressionView(this, theMessage); AddTab(m_CompressionView, compressionTab); compressionTab->SetLabel("Compression"); // Get VideoImageView from resource BTab *imageTab = new BTab(); theMessage = GetWindowFromResource("VideoImageView"); ASSERT(theMessage); m_ImageView = new TVideoImageView(this, theMessage); AddTab(m_ImageView, imageTab); imageTab->SetLabel("Image"); // Get VideoImageSource from resource BTab *sourceTab = new BTab(); theMessage = GetWindowFromResource("VideoSourceView"); ASSERT(theMessage); m_SourceView = new TVideoSourceView(this, theMessage); AddTab(m_SourceView, sourceTab); sourceTab->SetLabel("Source"); }
int CAdvanceTabWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CTabWnd::OnCreate(lpCreateStruct) == -1) return -1; // TODO: 在此添加您专用的创建代码 SetBarBkDraw(new CPageTabBkDraw); SetBarMarginLogic(CRect(10, 0, 0, 0)); InitToolBar(); CTabItem_Normal *pNormalTabItem = NULL; pNormalTabItem = new CTabItem_Normal; pNormalTabItem->SetCaption(GetResString(IDS_SERVER)); pNormalTabItem->SetRelativeWnd(theApp.emuledlg->serverwnd->GetSafeHwnd()); m_aposTabs[TI_SERVER] = AddTab(pNormalTabItem); pNormalTabItem = NULL; pNormalTabItem = new CTabItem_Normal; pNormalTabItem->SetCaption(GetResString(IDS_EM_KADEMLIA)); pNormalTabItem->SetRelativeWnd(theApp.emuledlg->kademliawnd->GetSafeHwnd()); m_aposTabs[TI_KAD] = AddTab(pNormalTabItem); pNormalTabItem = NULL; pNormalTabItem = new CTabItem_Normal; pNormalTabItem->SetCaption(GetResString(IDS_EM_STATISTIC)); pNormalTabItem->SetRelativeWnd(theApp.emuledlg->statisticswnd->GetSafeHwnd()); m_aposTabs[TI_STAT] = AddTab(pNormalTabItem); pNormalTabItem = NULL; return 0; }
int InitPlugin(void) { if(Inited == TRUE) return FALSE; Inited = TRUE; AddCommand("info", Command_Info); AddCommand("tileinfo", Command_TileInfo); /* not quite sure if this is needed */ /* InitCommonControls(); */ LayersWnd = CreateDialog(DLLInst, MAKEINTRESOURCE(DIALOG_LAYERINFO), GetMainTabWindow(), (DLGPROC)LayersDlgProc); PlayersWnd = CreateDialog(DLLInst, MAKEINTRESOURCE(DIALOG_PLAYERINFO), GetMainTabWindow(), (DLGPROC)PlayersDlgProc); if(LayersWnd == NULL || PlayersWnd == NULL) MBOut("INFO PLUGIN", "Could not create the dialog"); else { AddTab(LayersWnd, "Layers", FALSE); AddTab(PlayersWnd, "Players", FALSE); } return TRUE; }
int AscentAPDlg::OnInitDialog (WPARAM wParam) { AddTab (new AscentAPDlgTabControl (this), "Control"); AddTab (new AscentAPDlgTabGimbal (this), "Gimbal"); AddTab (new AscentAPDlgTabThrust (this), "Thrust"); AddTab (new AscentAPDlgTabAltitude (this), "Altitude"); return TabbedDialog::OnInitDialog (wParam); }
void tcOptionsView::Init() { wxString s; //LoadBackgroundImage("options_bk.jpg"); mpiButtonOn = LoadTexture("options_bon.bmp"); mpiButtonOff = LoadTexture("options_boff.bmp"); wxASSERT(mpiButtonOn.get() != 0); wxASSERT(mpiButtonOn->IsLoaded()); if ((mpiButtonOn.get() != 0) && mpiButtonOn->IsLoaded()) { mnButtonWidth = mpiButtonOn->Width(); mnButtonHeight = mpiButtonOn->Height(); } else { fprintf(stderr, "tcOptionsView::Init - error loading button images\n"); } AddTab("Game"); AddTab("Sound"); AddTab("Graphics"); AddTab("Units"); AddTab("Multiplayer"); AddTab("Lighting"); AddTab("Water"); AddTab("Other3D"); SetTab("Game"); }
void ControlsView::VolumeTabView::AttachedToWindow() { // Populate the menu with the persistent volumes. fVolumeRoster = new BVolumeRoster(); BVolume tempVolume; while (fVolumeRoster->GetNextVolume(&tempVolume) == B_OK) { if (!tempVolume.IsPersistent()) continue; char name[B_PATH_NAME_LENGTH]; if (tempVolume.GetName(name) != B_OK) continue; if (strcmp(name, "system") == 0 || strcmp(name, "config") == 0) { // Don't include virtual volumes. continue; } BVolume* volume = new BVolume(tempVolume); VolumeView* volumeView = new VolumeView(name, volume); VolumeTab* volumeTab = new VolumeTab(volume); AddTab(volumeView, volumeTab); } // Begin watching mount and unmount events. fVolumeRoster->StartWatching(BMessenger(this)); }
void CProfilerTabCtrl::UpdateProfiles(PERFORMANCEPROFILERTYPEMAP &map) { PERFORMANCEPROFILERTYPEMAP::iterator perfmapIter = map.begin(); for (; perfmapIter != map.end(); perfmapIter++) { DWORD dwType = perfmapIter->first; NAMEINDEXMAP::iterator mapIter = m_TabNames.find(dwType); if (mapIter == m_TabNames.end()) { AddTab(EngineGetToolBox()->GetHashString(dwType), (perfmapIter->second).displayType); } else { int index = mapIter->second; if (m_InternalBoxes.size() > (UINT)index) { CProfileBox *box = m_InternalBoxes[index]; if ((box) && (box->IsWindowVisible() == TRUE)) { box->UpdateProfile((perfmapIter->second).map); } } } } }
/** * Adds the "Forced" pane to the watch. * * @param * @return * @exception - * @see */ void CWatchWindow::AddForcedPane () { CString strText; // Nothing to do if we already have the "Forced" pane. ////////////////////////////////////////////////////// if (m_iForcedPaneTab != -1) return; // Add a tab for our "Forced" pane. It is to the right of all custom pane tabs. // Note that Stingrays tab window does not allow to use the InsertTab method to // append a tab. Instead we have to use AddTab in this case. Set scroll style of // new tab. //////////////////////////////////////////////////////////////////////////////// strText.LoadString (IDS_WATCH_FORCED_PANE_CAPTION); m_iForcedPaneTab = m_iCustomPaneCount; AddTab(strText, eForce); m_pTabWindow->SetScrollStyle (m_iForcedPaneTab, 0); }
LRESULT CTangramTabCtrlWnd::OnCreatePage(WPARAM wParam, LPARAM lParam) { HWND hPageWnd = (HWND)wParam; //CTabPageWnd* pWnd = new CTabPageWnd(); //pWnd->SubclassWindow(hPageWnd); CWnd* pWnd = FromHandlePermanent(hPageWnd); if (pWnd == NULL) { pWnd = new CTabPageWnd(); pWnd->SubclassWindow(hPageWnd); } AddTab(pWnd, (LPCTSTR)lParam, (UINT)GetTabsNum()-1); //AddTab(pView,LPCTSTR(pObj->m_strCaption),0); //if(nIndex==m_pTangramXMLObj->m_nActivePage) //{ // SetFocusedItem(pItem); //} //AddPage(pWnd,(LPCTSTR)lParam); //SendMessage(WM_TGM_SETACTIVEPAGE); InvalidateRect(NULL); //if(pWnd) //{ // pWnd->UnsubclassWindow(); // delete pWnd; //} return 0; }
TBrowserTab* TBrowserTabs::AddTab() { CStr url; TBrowserTab* pTab = AddTab(url); return pTab; }
BOOL ArxDbgUiTdmTransDbClones::OnInitDialog() { CAcUiTabMainDialog::OnInitDialog(); if (m_winTitle.IsEmpty() == FALSE) SetWindowText(m_winTitle); SetAcadTabPointer(&m_tabCtrl); AddTab(0, _T("Clone Set"), ArxDbgUiTdcCloneSet::IDD, m_tdcCloneSet); AddTab(1, _T("Wblock Clone"), ArxDbgUiTdcWblockClone::IDD, m_tdcWblockClone); AddTab(2, _T("Insert"), ArxDbgUiTdcInsert::IDD, m_tdcInsert); return TRUE; }
void TBrowserTabs::TreeItem_GotFocus() { //MessageLog_AppendTextFormatCo(d_coChocolate, "TBrowserTabs::TreeItem_GotFocus()"); if ( m_pawLayoutBrowser == NULL) { m_pawLayoutBrowser = new WLayoutTabbedBrowser(this, m_pProfile); // add tabs added before the layout was initialized TBrowserTab **ppBrowserTabStop; TBrowserTab **ppBrowserTab = m_arraypaTabs.PrgpGetBrowserTabStop(&ppBrowserTabStop); while(ppBrowserTab != ppBrowserTabStop) { TBrowserTab *pBrowserTab = *ppBrowserTab++; m_pawLayoutBrowser->AddTab(pBrowserTab); CStr text("Tab"); pBrowserTab->m_strNameDisplayTyped = text; //pBrowserTab->TreeItemW_DisplayWithinNavigationTree(this); } // add default tab if there was none if ( m_arraypaTabs.GetSize() == 0) AddTab(); } MainWindow_SetCurrentLayout(IN m_pawLayoutBrowser); }
int CEditorTabCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMFCTabCtrl::OnCreate(lpCreateStruct) == -1) return -1; EnableTabSwap(FALSE); m_TerrainDlg.Create(IDD_TERRAIN_EDITOR,this); m_TerrainDlg.ShowWindow(SW_SHOW); m_SceneDlg.Create(IDD_SCENE_EDITOR,this); m_SceneDlg.ShowWindow(SW_SHOW); AddTab(&m_TerrainDlg,"Terrain",-1); AddTab(&m_SceneDlg,"Object",-1); return 0; }
//*----------------------------------------------------------------------- //| PopupExport //| //| PURPOSE: Convert Popup Menu Structure. It is a recursive routine //| that will handle hierarchical Popup menu. //| //| ENTRY: szText - Popup Menu Title String //| lpItem - pointer to Control Structure array //| nIndex - Index to the control array //| cSubMenu - Number of Submenu in the Popup Menu //| cNoOfTab - Number of Tab indentation //| hExFile - Export file's file handle //| //| EXIT: Zero if successful, or error code if failed //*----------------------------------------------------------------------- VOID PopupExport(LPSTR szText, LPCTLDEF lpItem, INT FAR *nIndex, INT cSubMenu, INT cNoOfTab, INT hExFile) { CHAR szTemp[cchTextMac]; CHAR szTab[cchTextMac]; INT cItem; // increase the array index by 1 to skip the Popup's own description //------------------------------------------------------------------ (*nIndex)++; // Setup and Output Popup Menu's Header Structure //----------------------------------------------- AddTab(szTab, cNoOfTab); wsprintf(szTemp,"%sPOPUP \"%s\"\r\n",(LPSTR)szTab, (LPSTR)szText); M_lwrite(hExFile, szTemp, lstrlen(szTemp)); // Setup and Output BEGIN //----------------------- wsprintf(szTemp,"%sBEGIN\r\n", (LPSTR)szTab); M_lwrite(hExFile, szTemp, lstrlen(szTemp)); // Loop through the number of submenu in a Popup menu and convert // each item. If the item is a popup menu, call PopupExport again to // handle each subitem of the (sub) Popup. //--------------------------------------------------------------- for (cItem = 0;cItem < cSubMenu; cItem++) { // lStyleBits contains the number of SubItem in a Item. If it // is not 0, it is a popup menu. //------------------------------------------------------------ if (lpItem[*nIndex].lStyleBits != 0) PopupExport((LPSTR) lpItem[*nIndex].rgText, lpItem, nIndex, (INT)(lpItem[*nIndex].lStyleBits), cNoOfTab+1, hExFile); else { // Output MenuItem text //------------------------------------ MenuItemExport(lpItem[*nIndex].rgText, (100 + *nIndex), lpItem[*nIndex].nState, cNoOfTab+1, hExFile); (*nIndex)++; } } // Setup and Output END string //---------------------------- wsprintf(szTemp,"%sEND\r\n\r\n",(LPSTR)szTab); M_lwrite(hExFile, szTemp, lstrlen(szTemp)); }
void TabContainerView::AddTab(const char* label, int32 index) { TabView* tab; if (fController) tab = fController->CreateTabView(); else tab = new TabView(); tab->SetLabel(label); AddTab(tab, index); }
wxEntityTreeNotebook::wxEntityTreeNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxAuiNotebook(parent, id, pos, size, style) { mLastTab = 0; mResourcesTree = new wxObjectFolderTree(this, -1, wxDefaultPosition, wxSize(250,400)); mScriptTree = new wxScriptFileTree(this, -1, wxDefaultPosition, wxSize(250,400)); mSceneTree = new wxOgreSceneTree(this, -1, wxDefaultPosition, wxSize(250,500)); mMaterialTree = new wxMaterialTree(this, -1, wxDefaultPosition, wxSize(250,500)); mMediaTree = new wxMediaTree(this, wxID_ANY, wxDefaultPosition, wxSize(300,500)); AddTab(mMediaTree, mMediaTree, "Assets"); AddTab(mResourcesTree, mResourcesTree, "Resources"); AddTab(mScriptTree, mScriptTree, "Scripts"); AddTab(mMaterialTree, mMaterialTree, "Materials"); AddTab(mSceneTree, mSceneTree, "Scene"); }
BOOL CPreferencesDlg::OnInitDialog() { CDialog::OnInitDialog(); if (m_pScanningTABDlg == NULL) { m_pScanningTABDlg = new CScanningTABDlg; } m_pScanningTABDlg->Create(m_pScanningTABDlg->IDD, &m_preferencestabctrl); AddTab(m_pScanningTABDlg, _T("Scanning"), 0); if (m_pDisplayTABDlg == NULL) { m_pDisplayTABDlg = new CDisplayTABDlg; } m_pDisplayTABDlg->Create(m_pDisplayTABDlg->IDD, &m_preferencestabctrl); AddTab(m_pDisplayTABDlg, _T("Display"), 1); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
PrefletView::PrefletView(SettingsHost* host) : BTabView("pages") { // Pages GeneralView* general = new GeneralView(host); DisplayView* display = new DisplayView(host); NotificationsView* apps = new NotificationsView(host); // Page selector BTab* tab = new BTab(); AddTab(general, tab); tab->SetLabel(B_TRANSLATE("General")); tab = new BTab(); AddTab(display, tab); tab->SetLabel(B_TRANSLATE("Display")); tab = new BTab(); AddTab(apps, tab); tab->SetLabel(B_TRANSLATE("Notifications")); }
BOOL ArxDbgUiTdmIdMap::OnInitDialog() { CAcUiTabMainDialog::OnInitDialog(); if (m_winTitle.IsEmpty() == FALSE) SetWindowText(m_winTitle); SetAcadTabPointer(&m_tabCtrl); AddTab(0, _T("Id Mapping"), ArxDbgUiTdcIdMap::IDD, m_tdcIdMap); return TRUE; }
BOOL ArxDbgUiTdmLongTrans::OnInitDialog() { CAcUiTabMainDialog::OnInitDialog(); if (m_winTitle.IsEmpty() == FALSE) SetWindowText(m_winTitle); SetAcadTabPointer(&m_tabCtrl); AddTab(0, _T("Long Transaction"), ArxDbgUiTdcLongTrans::IDD, m_tdcLongTrans); return TRUE; }
EProperty* EPropList::AddProperty( EProperty* pProperty ) { if( m_vTabGroups.size() == 0 ) { AddTab("Default"); m_bHasUserTabs = false; } pProperty->m_nIndent = m_nIndent; pProperty->m_pParentHost = (m_vParentStack.size()>0) ? m_vParentStack.top() : NULL; GetTab(m_nCurrentTab)->AddProperty(pProperty); return pProperty; }
Widget_Rubrica::Widget_Rubrica(QWidget *iParent, QString iTitleWidget, QString iNameObj) : Widget_Template(iParent, iTitleWidget, iNameObj) { QHBoxLayout * Box = new QHBoxLayout(); QWidget *Widget = new QWidget(); Box->addWidget(Widget); Box->setMargin(0); QHBoxLayout* TabLayout = new QHBoxLayout(); TabLayout->setContentsMargins(0,12,9,0); TabLayout->addWidget(TabWidget); Widget->setLayout(TabLayout); setLayout(Box); Browse = new Browse_Rubrica(0,tr("Редактор Рубрик"),"Browse_Rubrica"); AddTab(Browse); }
int InitPlugin(void) { if(Inited == TRUE) return FALSE; Inited = TRUE; AboutWnd = CreateDialog(DLLInst, MAKEINTRESOURCE(DIALOG_ABOUT), GetMainTabWindow(), (DLGPROC)AboutDlgProc); if(AboutWnd == NULL) MBOut("ABOUT PLUGIN", "Could not create the dialog"); else AddTab(AboutWnd, "About", FALSE); return TRUE; }
int CDlgBlockAnalysis::ReDrowTab() { if( m_TypeAndBlock == NULL ) return -1; TYPEANDBLOCK **pType = (TYPEANDBLOCK **)m_TypeAndBlock->m_ayBlockCalc.GetData(); for(int i = 0; i < m_TypeAndBlock->m_ayBlockCalc.GetSize(); i++) { AddTab(pType[i]->strTypeName); } m_Tab_Ctrl.SetCurFocus(0); m_Tab_Ctrl.SetCurSel(0); ReDrowListData(0); return 0; }
//*----------------------------------------------------------------------- //| MenuItemExport //| //| PURPOSE: Convert MenuItem Structure to ASCII format //| //| ENTRY: szText - Menu Item Name String //| wMenuID - Menu ID number //| wState - Menu State //| cNoOfTab - Number of Tab indentation //| hExFile - Export file's file handle //| //| EXIT: Zero if successful, or error code if failed //*----------------------------------------------------------------------- VOID MenuItemExport(LPSTR szText, INT wMenuID, INT wState, INT cNoOfTab, INT hExFile) { CHAR szTab[cchTextMac]; CHAR szTemp[cchTextMac]; // Skip this item, if it is a Menubreak or a MenuBarBreak. //-------------------------------------------------------- if ((!lstrcmp(szText, "MF_MENUBREAK")) || (!lstrcmp(szText, "MF_MENUBARBREAK"))) return; // Setup Tabs header //----------------------------------- AddTab(szTab, cNoOfTab); // if the MenuItem name is MF_SEPARATOR, handle it seperately //----------------------------------------------------------- if (!lstrcmp(szText, "MF_SEPARATOR")) wsprintf(szTemp, "%sMENUITEM SEPARATOR", (LPSTR)szTab); else // Setup MENUITEM and MENUID //--------------------------------------------------- wsprintf(szTemp,"%sMENUITEM \"%s\", %i", (LPSTR)szTab,(LPSTR)szText, wMenuID); // Check and Setup all MenuItem State and append appropriate options // at the end of the MENUITEM output. //------------------------------------------------------------------ if (wState & MF_CHECKED) lstrcat(szTemp, ", CHECKED"); if (wState & MF_GRAYED) lstrcat(szTemp, ", GRAYED"); if (wState & MF_HELP) lstrcat(szTemp, ", HELP"); if (wState & MF_MENUBARBREAK) lstrcat(szTemp, ", MENUBARBREAK"); if (wState & MF_MENUBREAK) lstrcat(szTemp, ", MENUBREAK"); lstrcat(szTemp, "\r\n"); // Output the MENUITEM Text to file //----------------------------------- M_lwrite(hExFile, szTemp, lstrlen(szTemp)); }
void CAdvanceTabWnd::InitToolBar(void) { m_toolbar.Create(WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0), this, AFX_IDW_TOOLBAR); m_toolbar.SetOwner(theApp.emuledlg); m_toolbar.SetIndent(8); //CSize szToolBar; //m_toolbar.GetMaxSize(&szToolBar); CTabItem_Wnd *pTabItemWnd = new CTabItem_Wnd; pTabItemWnd->SetItemWnd(&m_toolbar, FALSE); //pTabItemWnd->SetWindowLength(szToolBar.cx + 8); pTabItemWnd->SetDynDesireLength(TRUE); AddTab(pTabItemWnd); pTabItemWnd = NULL; }
void ControlsView::VolumeTabView::_AddVolume(dev_t device) { // Make sure the volume is not already in the menu. for (int i = 0; VolumeTab* item = (VolumeTab*)TabAt(i); i++) { if (item->Volume()->Device() == device) return; } BVolume* volume = new BVolume(device); VolumeTab* item = new VolumeTab(volume); char name[B_PATH_NAME_LENGTH]; volume->GetName(name); AddTab(new VolumeView(name, volume), item); Invalidate(); }
/** * insert tab. * * @param [in] iIndex: index of new tab * @param [in] crstrLabel: tab label * @param [in] eType: tab type * @return pointer to new SECTab * @exception - * @see ETabType */ SECTab* CWatchWindow::InsertTab(int iIndex, const CString& crstrLabel, ETabType eType) { SECTab* pTab = NULL; if(iIndex < 0 || iIndex >= m_pTabWindow->GetTabCount()) { return AddTab(crstrLabel, eType); } pTab = m_pTabWindow->InsertTab(RUNTIME_CLASS (CWatchControlParent), iIndex, crstrLabel); if(pTab) { if(pTab->m_pClient == NULL) { m_pTabWindow->RemoveTab(iIndex); return NULL; } ETabType* pTabType = new ETabType; *pTabType = eType; pTab->m_pExtra = (void*)pTabType; m_tTabInfo.AddHead(pTabType); } return pTab; }
CSettings::CSettings(CMenu* pMenu) : gui::CTabs(pMenu), m_pMenu(pMenu) { SetTabsStyle(CAssetPath::GuiTabsStyleSystem(GUITABSSTYLE_MENU_MAIN)); m_pGeneralTab = CreateGeneralTab(); m_pPlayerTab = CreatePlayerTab(); m_pCharacterTab = new gui::CVScrollLayout(pMenu); m_pControlTab = new gui::CVScrollLayout(pMenu); m_pGraphicsTab = new gui::CVScrollLayout(pMenu); m_pSoundTab = new gui::CVScrollLayout(pMenu); AddTab(m_pGeneralTab, _("General"), CAssetPath::Null()); AddTab(m_pPlayerTab, _("Player"), CAssetPath::Null()); AddTab(m_pCharacterTab, _("Tee"), CAssetPath::Null()); AddTab(m_pControlTab, _("Controls"), CAssetPath::Null()); AddTab(m_pGraphicsTab, _("Graphics"), CAssetPath::Null()); AddTab(m_pSoundTab, _("Sound"), CAssetPath::Null()); }