Skip to content

Commit

Permalink
Ключ комстроки DebugUi
Browse files Browse the repository at this point in the history
  • Loading branch information
zamtmn committed Dec 10, 2024
1 parent f7b418d commit 864f0ee
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions cad_source/zcad/gui/uzcmainwindow.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ procedure TZCADMainWindow._onCreate(Sender: TObject);
RegisterGeneralContextCheckFunc('ShiftPressed',@GMCCFShiftPressed);
RegisterGeneralContextCheckFunc('AltPressed',@GMCCFAltPressed);
RegisterGeneralContextCheckFunc('ActiveDrawing',@GMCCFActiveDrawing);
RegisterGeneralContextCheckFunc('DebugUI',@GMCCFDebugUI);

LoadActions;
toolbars:=tstringlist.Create;
Expand Down
8 changes: 6 additions & 2 deletions cad_source/zcad/gui/uzcmenucontextcheckfuncs.pas
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
interface
uses
LCLIntf,LCLType,
uzedrawingsimple,uzcdrawings;
uzedrawingsimple,uzcdrawings,uzcCommandLineParser;
function GMCCFTrue(const Context:TObject):boolean;
function GMCCFFalse(const Context:TObject):boolean;

function GMCCFCtrlPressed(const Context:TObject):boolean;
function GMCCFShiftPressed(const Context:TObject):boolean;
function GMCCFAltPressed(const Context:TObject):boolean;
function GMCCFActiveDrawing(const Context:TObject):boolean;
function GMCCFDebugUI(const Context:TObject):boolean;
implementation
function GMCCFTrue(const Context:TObject):boolean;
begin
Expand Down Expand Up @@ -60,7 +61,10 @@ function GMCCFActiveDrawing(const Context:TObject):boolean;
//end else
// result:=false;
end;

function GMCCFDebugUI(const Context:TObject):boolean;
begin
result:=CommandLineParser.HasOption(DEBUGUIHDL);
end;

begin
end.
2 changes: 2 additions & 0 deletions cad_source/zcad/uzccommandlineparser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface

NOSPLASHHDL, //опция nosplash - не показывать сплэш
UPDATEPOHDL, //опция updatepo - актуализация файлов локализации, необходима для команды updatepo
DEBUGUIHDL, //опция debugui - наличие отладочных элементов в интерфейсе
NOLOADLAYOUTHDL, //опция noloadlayout - запуск без загрузки начального состояния раскладки окон
LOGFILEHDL, //опция logfile - указание лог файла, требует аргумент(ы) имя файла
NOTCHECKUNIQUEINSTANCEHDL,//опция noloadlayout - запуск без загрузки начального состояния раскладки окон
Expand All @@ -50,6 +51,7 @@ initialization
CommandLineParser.Init;
NOSPLASHHDL:=CommandLineParser.RegisterArgument('nosplash',AT_Flag);
UPDATEPOHDL:=CommandLineParser.RegisterArgument('updatepo',AT_Flag);
DEBUGUIHDL:=CommandLineParser.RegisterArgument('debugui',AT_Flag);
NOLOADLAYOUTHDL:=CommandLineParser.RegisterArgument('noloadlayout',AT_Flag);
LOGFILEHDL:=CommandLineParser.RegisterArgument('logfile',AT_WithOperands);
NOTCHECKUNIQUEINSTANCEHDL:=CommandLineParser.RegisterArgument('notcheckuniqueinstance',AT_Flag);
Expand Down
2 changes: 2 additions & 0 deletions environment/runtimefiles/common/menu/menuscontent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@
<InsertMenu Name="Window"/>
</IFONE>
<InsertMenu Name="Help"/>
<IFONE Сonditions="DebugUI">
<InsertMenu Name="Debug"/>
</IFONE>
</Menu>
</MenusContent>
</CONFIG>
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@
<InsertMenu Name="Window"/>
</IFONE>
<InsertMenu Name="Help"/>
<IFONE Сonditions="DebugUI">
<InsertMenu Name="Debug"/>
</IFONE>
</Menu>
<Menu2 Name="MAINMENU2">
<InsertMenu Name="File"/>
Expand All @@ -404,7 +406,9 @@
<InsertMenu Name="Settings"/>
<InsertMenu Name="Window"/>
<InsertMenu Name="Help"/>
<IFONE Сonditions="DebugUI">
<InsertMenu Name="Debug"/>
</IFONE>
<InsertMenu Name="DB"/>
</Menu2>
</MenusContent>
Expand Down

0 comments on commit 864f0ee

Please sign in to comment.