Algorithmic Solutions > LEDA > LEDA Guide > Windows and Panels > Panel Buttons

Panel Buttons

A panel button is a special panel item.

Properties

  • A panel button can be pressed by clicking a mouse button when the mouse pointer is inside its area.
  • Each button has a label, a bitmap or a pixrect (displayed on the button) and an associated number.
  • Buttons can have associated action functions of type
      void (*action) (int but)
    or an attached subwindow. In the latter case, we call the button a menu buttons.

Example: Bitmap Buttons

The screenshot on the right from the example of bitmap buttons shows a panel of bitmap buttons.

Example of Bitmap Buttons

Picture of Convex Hull

Example: Pixrect Buttons

The screenshot on the right from the example of pixrect buttons shows a panel of pixrect buttons.

Example of Pixrect Buttons

Picture of Convex Hull

Creating a Menu Bar

There are two styles for menu buttons, i.e., buttons with an attached subwindow.

In the default style, menu buttons are displayed as buttons with an additional menu-sign.

In the second style, menu buttons are arranged into a menu bar at the top of the panel section. The function

	void W.make_menu_bar()

selects the menu button style.

The Example Menu Bar demonstrates both alternatives for menu buttons.

Example Menu Bar

Picture of Convex Hull

Default Style

Picture of Convex Hull

Menu Bar Style

See also:

Windows and Panels

Panel Items

Bitmaps

Pixrects (Pixmaps)


Manual Pages:

Manual Page Windows

Manual Page Panels

Manual Page Menus




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH