JWM Source Documentation

TrayComponentType Struct Reference

Structure to hold common tray component data. More...

#include <tray.h>

Data Fields

struct TrayTypetray
 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 TrayComponentTypenext
 The next component in the tray.

Detailed Description

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.


Field Documentation

Callback to create the component.

Definition at line 80 of file tray.h.

Callback to destroy the component.

Definition at line 83 of file tray.h.

1 if the mouse was grabbed by this component.

Definition at line 74 of file tray.h.

Actual height.

Definition at line 72 of file tray.h.

The next component in the tray.

Definition at line 108 of file tray.h.

Additional information needed for the component.

Definition at line 59 of file tray.h.

Content (if a pixmap, otherwise None).

Definition at line 77 of file tray.h.

void(* TrayComponentType::ProcessButtonPress)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse presses.

Definition at line 96 of file tray.h.

void(* TrayComponentType::ProcessButtonRelease)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse releases.

Definition at line 100 of file tray.h.

void(* TrayComponentType::ProcessMotionEvent)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse motion.

Definition at line 104 of file tray.h.

Requested height.

Definition at line 69 of file tray.h.

Requested width.

Definition at line 68 of file tray.h.

Callback to resize the component.

Definition at line 93 of file tray.h.

x-coordinate on the screen (valid only after Create).

Definition at line 64 of file tray.h.

y-coordinate on the screen (valid only after Create).

Definition at line 65 of file tray.h.

Callback to set the size known so far.

This is needed for items that maintain width/height ratios. Either width or height may be zero. This is called before Create.

Definition at line 90 of file tray.h.

The tray containing the component.

UpdateSpecificTray(TrayType*, TrayComponentType*) should be called when content changes.

Definition at line 56 of file tray.h.

Actual width.

Definition at line 71 of file tray.h.

Content (if a window, otherwise None).

Definition at line 76 of file tray.h.

x-coordinate on the tray (valid only after Create).

Definition at line 61 of file tray.h.

y-coordinate on the tray (valid only after Create).

Definition at line 62 of file tray.h.


The documentation for this struct was generated from the following file: