diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index a3a0520eec..6bfa4a052d 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -194,9 +194,9 @@ void EDA_3D_VIEWER::setupUIConditions() EDA_3D_CONDITIONS cond( &m_boardAdapter ); // Helper to define check conditions -#define MaterialCheck( x ) ACTION_CONDITIONS().SetCheckCondition( cond.MaterialMode( x ) ) -#define FlagCheck( x ) ACTION_CONDITIONS().SetCheckCondition( cond.Flag( x ) ) -#define GridSizeCheck( x ) ACTION_CONDITIONS().SetCheckCondition( cond.GridSize( x ) ) +#define MaterialCheck( x ) ACTION_CONDITIONS().Check( cond.MaterialMode( x ) ) +#define FlagCheck( x ) ACTION_CONDITIONS().Check( cond.Flag( x ) ) +#define GridSizeCheck( x ) ACTION_CONDITIONS().Check( cond.GridSize( x ) ) auto raytracingCondition = [this]( const SELECTION& aSel ) { @@ -204,7 +204,7 @@ void EDA_3D_VIEWER::setupUIConditions() }; RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW, - ACTION_CONDITIONS().SetCheckCondition( raytracingCondition ) ); + ACTION_CONDITIONS().Check( raytracingCondition ) ); mgr->SetConditions( EDA_3D_ACTIONS::materialNormal, MaterialCheck( MATERIAL_MODE::NORMAL ) ); @@ -245,8 +245,7 @@ void EDA_3D_VIEWER::setupUIConditions() return m_currentCamera.GetProjection() == PROJECTION_TYPE::ORTHO; }; - mgr->SetConditions( EDA_3D_ACTIONS::toggleOrtho, - ACTION_CONDITIONS().SetCheckCondition( orthoCondition ) ); + mgr->SetConditions( EDA_3D_ACTIONS::toggleOrtho, ACTION_CONDITIONS().Check( orthoCondition ) ); #undef MaterialCheck #undef FlagCheck diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index 3b28f7214b..eeede7a02b 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -367,8 +367,8 @@ void EDA_BASE_FRAME::setupUIConditions() for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ ) { ACTION_CONDITIONS cond; - cond.SetCheckCondition( std::bind( isCurrentLang, std::placeholders::_1, - LanguagesList[ii].m_WX_Lang_Identifier ) ); + cond.Check( std::bind( isCurrentLang, std::placeholders::_1, + LanguagesList[ii].m_WX_Lang_Identifier ) ); RegisterUIUpdateHandler( LanguagesList[ii].m_KI_Lang_Identifier, cond ); } diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index b4a14aa859..135fc30bc7 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -236,12 +236,12 @@ void CVPCB_MAINFRAME::setupUIConditions() wxASSERT( mgr ); -#define Enable( x ) ACTION_CONDITIONS().SetEnableCondition( x ) -#define Check( x ) ACTION_CONDITIONS().SetCheckCondition( x ) +#define ENABLE( x ) ACTION_CONDITIONS().Enable( x ) +#define CHECK( x ) ACTION_CONDITIONS().Check( x ) - mgr->SetConditions( CVPCB_ACTIONS::saveAssociations, Enable( cond.ContentModified() ) ); - mgr->SetConditions( ACTIONS::undo, Enable( cond.UndoAvailable() ) ); - mgr->SetConditions( ACTIONS::redo, Enable( cond.RedoAvailable() ) ); + mgr->SetConditions( CVPCB_ACTIONS::saveAssociations, ENABLE( cond.ContentModified() ) ); + mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) ); + mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) ); #define filterActive( filter ) ( m_filteringOptions & filter ) @@ -263,12 +263,12 @@ void CVPCB_MAINFRAME::setupUIConditions() return m_filteringOptions & FOOTPRINTS_LISTBOX::FILTERING_BY_PIN_COUNT; }; - mgr->SetConditions( CVPCB_ACTIONS::FilterFPbyFPFilters, Check( compFilter ) ); - mgr->SetConditions( CVPCB_ACTIONS::FilterFPbyLibrary, Check( libFilter ) ); - mgr->SetConditions( CVPCB_ACTIONS::filterFPbyPin, Check( pinFilter ) ); + mgr->SetConditions( CVPCB_ACTIONS::FilterFPbyFPFilters, CHECK( compFilter ) ); + mgr->SetConditions( CVPCB_ACTIONS::FilterFPbyLibrary, CHECK( libFilter ) ); + mgr->SetConditions( CVPCB_ACTIONS::filterFPbyPin, CHECK( pinFilter ) ); -#undef Check -#undef Enable +#undef CHECK +#undef ENABLE } diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index 8e5323c22c..a0f672e95c 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -190,17 +190,17 @@ void DISPLAY_FOOTPRINTS_FRAME::setupUIConditions() wxASSERT( mgr ); -#define Check( x ) ACTION_CONDITIONS().SetCheckCondition( x ) +#define CHECK( x ) ACTION_CONDITIONS().Check( x ) - mgr->SetConditions( ACTIONS::zoomTool, Check( cond.CurrentTool( ACTIONS::zoomTool ) ) ); - mgr->SetConditions( ACTIONS::selectionTool, Check( cond.CurrentTool( ACTIONS::selectionTool ) ) ); - mgr->SetConditions( ACTIONS::measureTool, Check( cond.CurrentTool( ACTIONS::measureTool ) ) ); + mgr->SetConditions( ACTIONS::zoomTool, CHECK( cond.CurrentTool( ACTIONS::zoomTool ) ) ); + mgr->SetConditions( ACTIONS::selectionTool, CHECK( cond.CurrentTool( ACTIONS::selectionTool ) ) ); + mgr->SetConditions( ACTIONS::measureTool, CHECK( cond.CurrentTool( ACTIONS::measureTool ) ) ); - mgr->SetConditions( ACTIONS::toggleGrid, Check( cond.GridVisible() ) ); - mgr->SetConditions( ACTIONS::toggleCursorStyle, Check( cond.FullscreenCursor() ) ); + mgr->SetConditions( ACTIONS::toggleGrid, CHECK( cond.GridVisible() ) ); + mgr->SetConditions( ACTIONS::toggleCursorStyle, CHECK( cond.FullscreenCursor() ) ); - mgr->SetConditions( ACTIONS::metricUnits, Check( cond.Units( EDA_UNITS::MILLIMETRES ) ) ); - mgr->SetConditions( ACTIONS::imperialUnits, Check( cond.Units( EDA_UNITS::INCHES ) ) ); + mgr->SetConditions( ACTIONS::metricUnits, CHECK( cond.Units( EDA_UNITS::MILLIMETRES ) ) ); + mgr->SetConditions( ACTIONS::imperialUnits, CHECK( cond.Units( EDA_UNITS::INCHES ) ) ); auto autoZoomCond = @@ -233,13 +233,13 @@ void DISPLAY_FOOTPRINTS_FRAME::setupUIConditions() return !GetDisplayOptions().m_DisplayGraphicsFill; }; - mgr->SetConditions( PCB_ACTIONS::zoomFootprintAutomatically, Check( autoZoomCond ) ); - mgr->SetConditions( PCB_ACTIONS::showPadNumbers, Check( padNumCond ) ); - mgr->SetConditions( PCB_ACTIONS::padDisplayMode, Check( padFillCond ) ); - mgr->SetConditions( PCB_ACTIONS::textOutlines, Check( textFillCond ) ); - mgr->SetConditions( PCB_ACTIONS::graphicsOutlines, Check( graphicsFillCond ) ); + mgr->SetConditions( PCB_ACTIONS::zoomFootprintAutomatically, CHECK( autoZoomCond ) ); + mgr->SetConditions( PCB_ACTIONS::showPadNumbers, CHECK( padNumCond ) ); + mgr->SetConditions( PCB_ACTIONS::padDisplayMode, CHECK( padFillCond ) ); + mgr->SetConditions( PCB_ACTIONS::textOutlines, CHECK( textFillCond ) ); + mgr->SetConditions( PCB_ACTIONS::graphicsOutlines, CHECK( graphicsFillCond ) ); -#undef Check +#undef CHECK } diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 6b9b5e26f4..aed0a68278 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -1182,22 +1182,22 @@ void GERBVIEW_FRAME::setupUIConditions() wxASSERT( mgr ); -#define Enable( x ) ACTION_CONDITIONS().SetEnableCondition( x ) -#define Check( x ) ACTION_CONDITIONS().SetCheckCondition( x ) +#define ENABLE( x ) ACTION_CONDITIONS().Enable( x ) +#define CHECK( x ) ACTION_CONDITIONS().Check( x ) - mgr->SetConditions( ACTIONS::zoomTool, Check( cond.CurrentTool( ACTIONS::zoomTool ) ) ); - mgr->SetConditions( ACTIONS::selectionTool, Check( cond.CurrentTool( ACTIONS::selectionTool ) ) ); - mgr->SetConditions( ACTIONS::measureTool, Check( cond.CurrentTool( ACTIONS::measureTool ) ) ); + mgr->SetConditions( ACTIONS::zoomTool, CHECK( cond.CurrentTool( ACTIONS::zoomTool ) ) ); + mgr->SetConditions( ACTIONS::selectionTool, CHECK( cond.CurrentTool( ACTIONS::selectionTool ) ) ); + mgr->SetConditions( ACTIONS::measureTool, CHECK( cond.CurrentTool( ACTIONS::measureTool ) ) ); - mgr->SetConditions( ACTIONS::toggleGrid, Check( cond.GridVisible() ) ); - mgr->SetConditions( ACTIONS::togglePolarCoords, Check( cond.PolarCoordinates() ) ); - mgr->SetConditions( ACTIONS::toggleCursorStyle, Check( cond.FullscreenCursor() ) ); + mgr->SetConditions( ACTIONS::toggleGrid, CHECK( cond.GridVisible() ) ); + mgr->SetConditions( ACTIONS::togglePolarCoords, CHECK( cond.PolarCoordinates() ) ); + mgr->SetConditions( ACTIONS::toggleCursorStyle, CHECK( cond.FullscreenCursor() ) ); - mgr->SetConditions( ACTIONS::metricUnits, Check( cond.Units( EDA_UNITS::MILLIMETRES ) ) ); - mgr->SetConditions( ACTIONS::imperialUnits, Check( cond.Units( EDA_UNITS::INCHES ) ) ); + mgr->SetConditions( ACTIONS::metricUnits, CHECK( cond.Units( EDA_UNITS::MILLIMETRES ) ) ); + mgr->SetConditions( ACTIONS::imperialUnits, CHECK( cond.Units( EDA_UNITS::INCHES ) ) ); - mgr->SetConditions( ACTIONS::acceleratedGraphics, Check( cond.CanvasType( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) ) ); - mgr->SetConditions( ACTIONS::standardGraphics, Check( cond.CanvasType( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ) ); + mgr->SetConditions( ACTIONS::acceleratedGraphics, CHECK( cond.CanvasType( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) ) ); + mgr->SetConditions( ACTIONS::standardGraphics, CHECK( cond.CanvasType( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ) ); auto flashedDisplayOutlinesCond = @@ -1248,14 +1248,14 @@ void GERBVIEW_FRAME::setupUIConditions() return m_DisplayOptions.m_FlipGerberView; }; - mgr->SetConditions( GERBVIEW_ACTIONS::flashedDisplayOutlines, Check( flashedDisplayOutlinesCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::linesDisplayOutlines, Check( linesFillCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::polygonsDisplayOutlines, Check( polygonsFilledCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::negativeObjectDisplay, Check( negativeObjectsCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::dcodeDisplay, Check( dcodeCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::toggleDiffMode, Check( diffModeCond ) ); - mgr->SetConditions( GERBVIEW_ACTIONS::flipGerberView, Check( flipGerberCond ) ); - mgr->SetConditions( ACTIONS::highContrastMode, Check( highContrastModeCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::flashedDisplayOutlines, CHECK( flashedDisplayOutlinesCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::linesDisplayOutlines, CHECK( linesFillCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::polygonsDisplayOutlines, CHECK( polygonsFilledCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::negativeObjectDisplay, CHECK( negativeObjectsCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::dcodeDisplay, CHECK( dcodeCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::toggleDiffMode, CHECK( diffModeCond ) ); + mgr->SetConditions( GERBVIEW_ACTIONS::flipGerberView, CHECK( flipGerberCond ) ); + mgr->SetConditions( ACTIONS::highContrastMode, CHECK( highContrastModeCond ) ); auto layersManagerShownCondition = @@ -1265,11 +1265,11 @@ void GERBVIEW_FRAME::setupUIConditions() }; RegisterUIUpdateHandler( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR, - Check( layersManagerShownCondition ) ); + CHECK( layersManagerShownCondition ) ); -#undef Check -#undef Enable +#undef CHECK +#undef ENABLE } diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index ae0ccf91ab..574f81c948 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -54,7 +54,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar() FILE_HISTORY& recentGbrFiles = GetFileHistory(); -#define FileHistoryCond( x ) ACTION_CONDITIONS().SetEnableCondition( FILE_HISTORY::FileHistoryNotEmpty( x ) ) +#define FileHistoryCond( x ) ACTION_CONDITIONS().Enable( FILE_HISTORY::FileHistoryNotEmpty( x ) ) // Create the gerber file menu if it does not exist. Adding a file to/from the history diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index bd970d7c2e..8b1d564f7b 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -56,19 +56,19 @@ struct ACTION_CONDITIONS showCondition = SELECTION_CONDITIONS::ShowAlways; // Always show by default } - ACTION_CONDITIONS& SetCheckCondition( const SELECTION_CONDITION& aCondition ) + ACTION_CONDITIONS& Check( const SELECTION_CONDITION& aCondition ) { checkCondition = aCondition; return *this; } - ACTION_CONDITIONS& SetEnableCondition( const SELECTION_CONDITION& aCondition ) + ACTION_CONDITIONS& Enable( const SELECTION_CONDITION& aCondition ) { enableCondition = aCondition; return *this; } - ACTION_CONDITIONS& SetShowCondition( const SELECTION_CONDITION& aCondition ) + ACTION_CONDITIONS& Show( const SELECTION_CONDITION& aCondition ) { showCondition = aCondition; return *this; diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index 4f0aa989d3..3809fce121 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -211,7 +211,7 @@ void KICAD_MANAGER_FRAME::setupUIConditions() }; ACTION_CONDITIONS activeProjectCond; - activeProjectCond.SetEnableCondition( activeProject ); + activeProjectCond.Enable( activeProject ); manager->SetConditions( KICAD_MANAGER_ACTIONS::editSchematic, activeProjectCond ); manager->SetConditions( KICAD_MANAGER_ACTIONS::editSymbols, activeProjectCond ); diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index f0ec05e6ea..0cd5295eef 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -75,7 +75,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Add the file menu condition here since it needs the item ID for the submenu ACTION_CONDITIONS cond; - cond.SetEnableCondition( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) ); + cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( fileHistory ) ); RegisterUIUpdateHandler( item->GetId(), cond ); fileMenu->Add( KICAD_MANAGER_ACTIONS::closeProject ); diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index 7caf35116b..b75e625a37 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -72,7 +72,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar() // Add the file menu condition here since it needs the item ID for the submenu ACTION_CONDITIONS cond; - cond.SetEnableCondition( FILE_HISTORY::FileHistoryNotEmpty( recentFiles ) ); + cond.Enable( FILE_HISTORY::FileHistoryNotEmpty( recentFiles ) ); RegisterUIUpdateHandler( item->GetId(), cond ); fileMenu->AppendSeparator(); diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index a278e84e1b..441365cd51 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -249,32 +249,32 @@ void PL_EDITOR_FRAME::setupUIConditions() wxASSERT( mgr ); -#define Enable( x ) ACTION_CONDITIONS().SetEnableCondition( x ) -#define Check( x ) ACTION_CONDITIONS().SetCheckCondition( x ) +#define ENABLE( x ) ACTION_CONDITIONS().Enable( x ) +#define CHECK( x ) ACTION_CONDITIONS().Check( x ) - mgr->SetConditions( ACTIONS::save, Enable( cond.ContentModified() ) ); - mgr->SetConditions( ACTIONS::undo, Enable( cond.UndoAvailable() ) ); - mgr->SetConditions( ACTIONS::redo, Enable( cond.RedoAvailable() ) ); + mgr->SetConditions( ACTIONS::save, ENABLE( cond.ContentModified() ) ); + mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) ); + mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) ); - mgr->SetConditions( ACTIONS::toggleGrid, Check( cond.GridVisible() ) ); - mgr->SetConditions( ACTIONS::toggleCursorStyle, Check( cond.FullscreenCursor() ) ); + mgr->SetConditions( ACTIONS::toggleGrid, CHECK( cond.GridVisible() ) ); + mgr->SetConditions( ACTIONS::toggleCursorStyle, CHECK( cond.FullscreenCursor() ) ); - mgr->SetConditions( ACTIONS::cut, Enable( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); - mgr->SetConditions( ACTIONS::copy, Enable( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); - mgr->SetConditions( ACTIONS::paste, Enable( SELECTION_CONDITIONS::Idle ) ); - mgr->SetConditions( ACTIONS::doDelete, Enable( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); + mgr->SetConditions( ACTIONS::cut, ENABLE( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); + mgr->SetConditions( ACTIONS::copy, ENABLE( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); + mgr->SetConditions( ACTIONS::paste, ENABLE( SELECTION_CONDITIONS::Idle ) ); + mgr->SetConditions( ACTIONS::doDelete, ENABLE( SELECTION_CONDITIONS::MoreThan( 0 ) ) ); - mgr->SetConditions( ACTIONS::zoomTool, Check( cond.CurrentTool( ACTIONS::zoomTool ) ) ); - mgr->SetConditions( ACTIONS::selectionTool, Check( cond.CurrentTool( ACTIONS::selectionTool ) ) ); - mgr->SetConditions( ACTIONS::deleteTool, Check( cond.CurrentTool( ACTIONS::deleteTool ) ) ); + mgr->SetConditions( ACTIONS::zoomTool, CHECK( cond.CurrentTool( ACTIONS::zoomTool ) ) ); + mgr->SetConditions( ACTIONS::selectionTool, CHECK( cond.CurrentTool( ACTIONS::selectionTool ) ) ); + mgr->SetConditions( ACTIONS::deleteTool, CHECK( cond.CurrentTool( ACTIONS::deleteTool ) ) ); - mgr->SetConditions( PL_ACTIONS::drawLine, Check( cond.CurrentTool( PL_ACTIONS::drawLine ) ) ); - mgr->SetConditions( PL_ACTIONS::drawRectangle, Check( cond.CurrentTool( PL_ACTIONS::drawRectangle ) ) ); - mgr->SetConditions( PL_ACTIONS::placeText, Check( cond.CurrentTool( PL_ACTIONS::placeText ) ) ); - mgr->SetConditions( PL_ACTIONS::placeImage, Check( cond.CurrentTool( PL_ACTIONS::placeImage ) ) ); + mgr->SetConditions( PL_ACTIONS::drawLine, CHECK( cond.CurrentTool( PL_ACTIONS::drawLine ) ) ); + mgr->SetConditions( PL_ACTIONS::drawRectangle, CHECK( cond.CurrentTool( PL_ACTIONS::drawRectangle ) ) ); + mgr->SetConditions( PL_ACTIONS::placeText, CHECK( cond.CurrentTool( PL_ACTIONS::placeText ) ) ); + mgr->SetConditions( PL_ACTIONS::placeImage, CHECK( cond.CurrentTool( PL_ACTIONS::placeImage ) ) ); // Not a tool, just a way to activate the action - mgr->SetConditions( PL_ACTIONS::appendImportedWorksheet, Check( SELECTION_CONDITIONS::ShowNever ) ); + mgr->SetConditions( PL_ACTIONS::appendImportedWorksheet, CHECK( SELECTION_CONDITIONS::ShowNever ) ); auto whiteBackgroundCondition = [ this ] ( const SELECTION& aSel ) { return GetDrawBgColor() == WHITE; @@ -295,11 +295,11 @@ void PL_EDITOR_FRAME::setupUIConditions() return WS_DATA_MODEL::GetTheInstance().m_EditMode == true; }; - mgr->SetConditions( PL_ACTIONS::layoutNormalMode, Check( titleBlockNormalMode ) ); - mgr->SetConditions( PL_ACTIONS::layoutEditMode, Check( titleBlockEditMode ) ); + mgr->SetConditions( PL_ACTIONS::layoutNormalMode, CHECK( titleBlockNormalMode ) ); + mgr->SetConditions( PL_ACTIONS::layoutEditMode, CHECK( titleBlockEditMode ) ); -#undef Check -#undef Enable +#undef CHECK +#undef ENABLE }