A dashboard consists of the following components: • A main dialog bar, which show the commonly used commands and entry fields. You perform most of your modeling tasks in thegraphics window and the dialog bar. When you activate a tool, the dialog bar displays commonly used options and collectors. • Standard buttons for controlling the tool. • Slide-down panels that open to reveal less commonly-used functionality. You can use them to perform advanced modeling actionsor retrieve comprehensive feature information. • A bitmap identifies the tool (typically the same icon used on buttons that invoke the tool).
Creo Parametric uses the dashboard to create features that involve extensive interaction with user interface components and geometry manipulation.You can use dashboards in Creo Parametric TOOLKIT applications: • Where a dialog box is too large in size or is intrusive onto the graphics window. Dashboards enable you to make a smooth-flowtool. • To present a streamlined “simple-user” activity with more complicated actions available to “expert users”. • Where Creo Parametric TOOLKIT dashboards are not only limited to feature creation activities and solid model modes.
Creo Parametric TOOLKIT does not currently provide access to create the feature dashboard’s standard buttons. However, you can use ProUIDashboardStdlayoutGet() to get the layout name where you can create and place the buttons in the standard button area. Typically this consists of(at least) OK and Cancel buttons.
static ProError MainPageNotification(ProUIDashboardPage page, ProUIDashboardPageEventType event_type, ProAppData appdata) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); ProError status; char *component_name; char *name; switch (event_type) { case PRO_UI_DASHBOARD_PAGE_CREATE: status = ProUIDashboardpageComponentnameGet(page, "ok_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_ok_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
status = ProUIDashboardpageComponentnameGet(page, "cancel_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_cancel_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
status = ProUIDashboardpageComponentnameGet(page, "msg_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_msg_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_CREATE")); break; case PRO_UI_DASHBOARD_PAGE_SHOW: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_SHOW")); break; case PRO_UI_DASHBOARD_PAGE_HIDE: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_HIDE")); break; case PRO_UI_DASHBOARD_PAGE_DESTROY: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_DESTROY")); break; default: break; } return PRO_TK_NO_ERROR; }
static ProError Slide1Notification(ProUIDashboardPage page, ProUIDashboardPageEventType event_type, ProAppData appdata) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); ProError status; char *component_name; char *name; switch (event_type) { case PRO_UI_DASHBOARD_PAGE_CREATE: status = ProUIDashboardpageTitleSet(page, _T("测试slide")); status = ProUIDashboardpageComponentnameGet(page, "msg_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(slide1_msg_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
AfxMessageBox(_T("Slide1_PRO_UI_DASHBOARD_PAGE_CREATE")); break; case PRO_UI_DASHBOARD_PAGE_SHOW: AfxMessageBox(_T("Slide1_PRO_UI_DASHBOARD_PAGE_SHOW")); break; case PRO_UI_DASHBOARD_PAGE_HIDE: AfxMessageBox(_T("Slide1_PRO_UI_DASHBOARD_PAGE_HIDE")); break;
case PRO_UI_DASHBOARD_PAGE_DESTROY: AfxMessageBox(_T("Slide1_PRO_UI_DASHBOARD_PAGE_DESTROY")); break; default: break; } return PRO_TK_NO_ERROR; }
static ProError MainPageNotification(ProUIDashboardPage page, ProUIDashboardPageEventType event_type, ProAppData appdata) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); ProError status; char *component_name; char *name; switch (event_type) { case PRO_UI_DASHBOARD_PAGE_CREATE: status = ProUIDashboardpageComponentnameGet(page, "ok_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_ok_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
status = ProUIDashboardpageComponentnameGet(page, "cancel_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_cancel_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
status = ProUIDashboardpageComponentnameGet(page, "msg_btn", &component_name); status = ProUIDashboardpageDevicenameGet(page, &name); status = ProUIPushbuttonActivateActionSet(name, component_name, (ProUIAction)(mainpage_msg_btn), page); status = ProStringFree(component_name); status = ProStringFree(name);
AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_CREATE")); break; case PRO_UI_DASHBOARD_PAGE_SHOW: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_SHOW")); break; case PRO_UI_DASHBOARD_PAGE_HIDE: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_HIDE")); break; case PRO_UI_DASHBOARD_PAGE_DESTROY: AfxMessageBox(_T("MainPage_PRO_UI_DASHBOARD_PAGE_DESTROY")); break; default: break; } return PRO_TK_NO_ERROR; }