⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uguivisibility.c

📁 Pro.TOOLKIT.Wildfire插件设计.配套光盘-141M.zip
💻 C
字号:
/*-----------------------------------------------------------------------------  File:		UgUIVisibility.c  Description:	ProTK doc code sample            PTC             File   Date   Version   Author  Vers  Comment--------- -------  -------- ----- ---------------------------------------------14-Jul-02  J-03-29  JCN     $$1   Submitted.-----------------------------------------------------------------------------*/#include <ProToolkit.h>#include <ProUIDialog.h>#include <ProUIPushbutton.h>#define UGUIVISIBILITY "uguivisibility"/*====================================================================*\FUNCTION: UserCloseActionPURPOSE:  Action function for the Close button in this example\*====================================================================*/static void UserCloseAction (char* dialog, char* button, ProAppData data){	ProUIDialogExit (UGUIVISIBILITY, PRO_TK_NO_ERROR);}/*====================================================================*\FUNCTION: UserVisibilityTogglePURPOSE:  Action function for the "Visible" checkbutton\*====================================================================*/static void UserVisibilityToggle (char* dialog, char* button, ProAppData data){	ProBoolean checked;	ProUICheckbuttonGetState (UGUIVISIBILITY, "VisibleCheck", &checked);	if (checked)		ProUIPushbuttonShow (UGUIVISIBILITY, "TargetBtn");	else		ProUIPushbuttonHide (UGUIVISIBILITY, "TargetBtn");}/*====================================================================*\FUNCTION: UserSensitivityTogglePURPOSE:  Action function for the "Sensitive" checkbutton\*====================================================================*/static void UserSensitivityToggle (char* dialog, char* button, ProAppData data){	ProBoolean checked;	ProUICheckbuttonGetState (UGUIVISIBILITY, "SensitiveCheck", &checked);	if (checked)		ProUIPushbuttonEnable (UGUIVISIBILITY, "TargetBtn");	else		ProUIPushbuttonDisable (UGUIVISIBILITY, "TargetBtn");}/*====================================================================*\FUNCTION: UserRelabelActionPURPOSE:  Action function for the "Label" input panel\*====================================================================*/static void UserRelabelAction (char* dialog, char* button, ProAppData data){	wchar_t* label;	ProUIInputpanelValueGet (UGUIVISIBILITY, "ButtonLabel", &label);	ProUIPushbuttonTextSet (UGUIVISIBILITY, "TargetBtn", label);	ProWstringFree (label);}/*====================================================================*\FUNCTION: UserUIVisibilityExamplePURPOSE:  Shows example of using runtime visibility and sensitivity of 			components\*====================================================================*/int UserUIVisibilityExample () {     ProLine wline;     int status;/*--------------------------------------------------------------------*\     Load the dialog from the resource file \*--------------------------------------------------------------------*/     ProUIDialogCreate(UGUIVISIBILITY, UGUIVISIBILITY);/*--------------------------------------------------------------------*\     Set the OK and Cancel button actions \*--------------------------------------------------------------------*/     ProUIPushbuttonActivateActionSet(UGUIVISIBILITY,"CloseButton",										UserCloseAction, NULL);    ProUICheckbuttonActivateActionSet(UGUIVISIBILITY,"VisibleCheck",UserVisibilityToggle,        NULL);	ProUICheckbuttonActivateActionSet(UGUIVISIBILITY,"SensitiveCheck",UserSensitivityToggle,        NULL);	ProUIInputpanelInputActionSet(UGUIVISIBILITY,"ButtonLabel",UserRelabelAction,        NULL);/*--------------------------------------------------------------------*\     Display and activate the dialog \*--------------------------------------------------------------------*/     ProUIDialogActivate(UGUIVISIBILITY, &status);/*--------------------------------------------------------------------*\     Remove the dialog from memory \*--------------------------------------------------------------------*/     ProUIDialogDestroy(UGUIVISIBILITY);    return(1); }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -