二次开发工具系列教程之PPT课件

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

7-1
Icons
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
7-2
Icon Example:
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
Input:
widget
parent
Parent widget ID. Must be a frame, a form, or a modalform.
string
callback Name of PCL function called for an event in this
widget. The
Function: Creates an icon item widget to be used as a child of a menu, or switch widget.
Input:
widget switch.
parent
ID of the parent widget. Must be a menu, menubar, or a
Name of the file containing the hex information that is used
logical
toggleable Value used only for menu items; ignored if the item is not a
menu item. If TRUE,
function must be in the class in
which the widget is created. Use "" if
events for
this widget are not of interest.
numeric
x
X location of toggle in inches relative to the parent.
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
7-7
Toggle Icon
ui_toggleicon_create( parent, callback, x, y, icon )
Function: Creates a toggleicon widget.
7-3
Types of Icon Widgets:
Buttonicon Itemicon Labelicon Toggleicon
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
7-4
Creating an icon (UNIX)
numeric
y
Y location of toggle in inches relative to the parent.
string toggle.
icon
Name ofhe
Output:
<Return Value> created.
Lecture 7 Advanced Patran GUI Programming: Icons, File Widget, Spreadsheet Widget
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
Use a bitmap utility program supplied by all Workstation Vendors. Usually called bitmap (Sun, SGI). Syntax:
• % bitmap [-options ...] filename [WIDTHxHEIGHT] • Example: • % bitmap -size 16x16 happy_face.icon • (a 16 pixel by 16 pixel file named happy_face.icon)
7-6
Creating an icon (NT)
You can use a Windows program called Paint (under Accessories) to create a windows bitmap file (.bmp)
The icon can be black and white, or color, as long as it is 16 x 16 pixels (standard NT icon size)
widget
Toggleicon widget ID. NULL if toggleicon widget is not
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
7-8
Item Icon
ui_itemicon_create( parent, name, iconname, toggleable )
string
name
Name of the widget. This name is frequently used as an
argument for the callback
function for the item's parent.
string
iconname
to describe the icon.
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
7-5
Creating an icon (UNIX) (cont.)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
相关文档
最新文档