The Icon Object

Synopsis

Class Name: Icon
Valid Parents: Toolbar
Valid Children: Popup

Description

A push button labeled with a pixmap icon. The icon has a label which is displayed when the pointer is positioned over the icon. Used for icon buttons on the Toolbar object.

  • Several of Gsharp's standard icons can be borrowed from $UNIDIR/base/Gsharp.gsa
  • If no directory is specified for the Pixmap, then Gsharp will look in $UNDIR/bitmaps

Inherited Resources

New Resources

Name Type Default
XuNguiShowLabel float true
  • Controls visibility of the icon label which is by default displayed when the pointer is positioned over the icon.

Callback Information

Reason Event
XuCR_ACTIVATE MB1 clicked on icon

Example Code - simple.gsa

  create Menubar gsharp_1.MenuBar;
  create Menu gsharp_1.MenuBar.FileMenu
   ( XuNguiLabel = "File"
   );
  create Button gsharp_1.MenuBar.FileMenu.Exit
   ( XuNguiCallback = "GuiFileExit",
     XuNguiLabel = "Exit ..."
   );

  create Toolbar gsharp_1.toptoolbar
   ( XuNguiCreateFunction = "GuiSetCommandToolbarId",
     XuNguiDestroyFunction = "GuiDestroyCommandToolbar"
   );
  create Icon gsharp_1.toptoolbar.print
   ( XuNguiLabel = "Print",
     XuNguiCallback = "GuiFilePrint",
     XuNguiPixmap = "print.xpm"
   );
  create Canvas gsharp_1.scrolledcanvas;
  create Command gsharp_1.command;

Return to Gsharp Applications Reference Manual