Data Fields |
| struct TrayType * | tray |
| | The tray containing the component.
|
| void * | object |
| | Additional information needed for the component.
|
| int | x |
| | x-coordinate on the tray (valid only after Create).
|
| int | y |
| | y-coordinate on the tray (valid only after Create).
|
| int | screenx |
| | x-coordinate on the screen (valid only after Create).
|
| int | screeny |
| | y-coordinate on the screen (valid only after Create).
|
| int | requestedWidth |
| | Requested width.
|
| int | requestedHeight |
| | Requested height.
|
| int | width |
| | Actual width.
|
| int | height |
| | Actual height.
|
| int | grabbed |
| | 1 if the mouse was grabbed by this component.
|
| Window | window |
| | Content (if a window, otherwise None).
|
| Pixmap | pixmap |
| | Content (if a pixmap, otherwise None).
|
| void(* | Create )(struct TrayComponentType *cp) |
| | Callback to create the component.
|
| void(* | Destroy )(struct TrayComponentType *cp) |
| | Callback to destroy the component.
|
| void(* | SetSize )(struct TrayComponentType *cp, int width, int height) |
| | Callback to set the size known so far.
|
| void(* | Resize )(struct TrayComponentType *cp) |
| | Callback to resize the component.
|
| void(* | ProcessButtonPress )(struct TrayComponentType *cp, int x, int y, int mask) |
| | Callback for mouse presses.
|
| void(* | ProcessButtonRelease )(struct TrayComponentType *cp, int x, int y, int mask) |
| | Callback for mouse releases.
|
| void(* | ProcessMotionEvent )(struct TrayComponentType *cp, int x, int y, int mask) |
| | Callback for mouse motion.
|
| struct TrayComponentType * | next |
| | The next component in the tray.
|
Structure to hold common tray component data.
Sizing is handled as follows:
- The component is created via a factory method. It sets its requested size (0 for no preference).
- The SetSize callback is issued with size constraints (0 for no constraint). The component should update width and height in SetSize.
- The Create callback is issued with finalized size information. Resizing is handled as follows:
- A component determines that it needs to change size. It updates its requested size (0 for no preference).
- The component calls ResizeTray.
- The SetSize callback is issued with size constraints (0 for no constraint). The component should update width and height in SetSize.
- The Resize callback is issued with finalized size information.
Definition at line 50 of file tray.h.