bool CNodePropertySheet::OnOK(bool applyOnly) { bool b = BaseClass::OnOK(applyOnly); if ( GetPropertySheet() ) { for ( int i = 0; i < GetPropertySheet()->GetNumPages(); i++ ) PostMessage( GetPropertySheet()->GetPage(i), new KeyValues( "RestoreNode" ) ); } GetNode()->RestoreFromKeyValues( pKV_NodeSettings ); //GetNode()->RestoreFromKeyValues_CreateBridges( pKV_NodeSettings ); pNodeView->MakeSolversDirty(); return b; }
void CNodePropertySheet::OnCancel() { bool bDoReset = false; for ( int i = 0; i < GetPropertySheet()->GetNumPages(); i++ ) { CSheet_Base *pSheet = assert_cast< CSheet_Base* >( GetPropertySheet()->GetPage( i ) ); if ( pSheet->RequiresReset() ) bDoReset = true; } if ( bDoReset ) { GetNode()->RestoreFromKeyValues( pKV_NodeSettings_Original ); pNodeView->MakeSolversDirty(); } BaseClass::OnCancel(); }
void CDiagramEntity::SetRect( double left, double top, double right, double bottom ) /* ============================================================ Function : CDiagramEntity::SetRect Description : Sets the object rect. Return : void Parameters : double left - Left edge double top - Top edge double right - Right edge double bottom - Bottom edge Usage : Call to place the object. ============================================================*/ { SetLeft( left ); SetTop( top ); SetRight( right ); SetBottom( bottom ); if( GetMinimumSize().cx != -1 ) if( GetRect().Width() < GetMinimumSize().cx ) SetRight( GetLeft() + GetMinimumSize().cx ); if( GetMinimumSize().cy != -1 ) if( GetRect().Height() < GetMinimumSize().cy ) SetBottom( GetTop() + GetMinimumSize().cy ); if( GetMaximumSize().cx != -1 ) if( GetRect().Width() > GetMaximumSize().cx ) SetRight( GetLeft() + GetMaximumSize().cx ); if( GetMaximumSize().cy != -1 ) if( GetRect().Height() > GetMaximumSize().cy ) SetBottom( GetTop() + GetMaximumSize().cy ); if( GetPropertySheet() ) GetPropertySheet()->SetValues(); }
// -------------------------------------------------------------------------------------------- // Die Haupt-Button "Zurück", "Weiter" bzw. "Fertig stellen" und "Abbrechen" de/aktivieren void CTopoRelRefDlg::AdjustSheetButtons() { CPropertySheet *pSheet = GetPropertySheet(); _ASSERTE(NULL != pSheet); DWORD dwBttns = 0; if (!(m_dwFlags & ADDPAGES_FIRSTPAGE)) dwBttns = PSWIZB_BACK; // nicht erste Seite if (!GetDisableNextPage()) { if (m_dwFlags & ADDPAGES_LASTPAGE) dwBttns |= PSWIZB_FINISH; // letzte Seite else dwBttns |= PSWIZB_NEXT; // nicht letzte Seite } else if (m_dwFlags & ADDPAGES_LASTPAGE) dwBttns |= PSWIZB_DISABLEDFINISH; pSheet -> SetWizardButtons(dwBttns); }
// -------------------------------------------------------------------------------------------- // Call-Back-Funktion für die Initialisierung der Controls void CEditCoordDlg::WindowInit (Event) { // explizite Initialisierung der Controls m_X.FInit(); m_Y.FInit(); m_DeleteButton.FInit(); m_DeleteText.FInit(); // OwnerDraw-Knopf initialisieren if (m_DeleteButton.LoadBitmaps (ResID(IDB_DELE, pRF), ResID(IDB_DELE_SEL, pRF), ResID(IDB_DELE_FOCUS, pRF), ResID(IDB_DELE_DISABLED, pRF))) m_DeleteButton.SizeToContent(); m_pED = (CEditDlg*) GetPropertySheet(); // Zugriff auf editiertes Objekt, das in der Sheet gehalten wird m_wObj = m_pED->GetObject(); m_lComONr = m_pED->GetComONr(); ControlsSetting(); }
// // Name: CGUIListenServer // Author: Hekar Khani // Description: GUI Panel to replace Valve's CreateServer // Notes: // CGUIListenServer::CGUIListenServer( vgui::VPANEL parent ) : BaseClass( NULL, "GUIListenServer" ) { SetParent( parent ); vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile( "resource/SourceScheme.res", "SourceScheme" ); SetScheme( scheme ); LoadControlSettings( "Resource/UI/ListenServer.res" ); SetVisible( false ); SetSizeable( false ); SetMoveable( false ); SetSmallCaption( true ); SetMaximizeButtonVisible( false ); SetMinimizeButtonVisible( false ); SetCloseButtonVisible( false ); SetMenuButtonResponsive( true ); SetDeleteSelfOnClose( false ); GetPropertySheet()->SetSmallTabs( false ); AddPage( new CPanelListenMain( this ), "Main" ); }