| Buzztard Bt-Edit Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include "bt-edit.h" struct BtUIResources; enum BtUIResourcesColors; enum BtUIResourcesMachineColors; BtUIResources * bt_ui_resources_new (void); GdkPixbuf * bt_ui_resources_get_icon_pixbuf_by_machine (const BtMachine *machine); GdkPixbuf * bt_ui_resources_get_machine_graphics_pixbuf_by_machine (const BtMachine *machine,gdouble zoom); GtkWidget * bt_ui_resources_get_icon_image_by_machine (const BtMachine *machine); GtkWidget * bt_ui_resources_get_icon_image_by_machine_type (GType machine_type); GdkColor * bt_ui_resources_get_gdk_color (BtUIResourcesColors color_type); void bt_ui_resources_get_rgb_color (BtUIResourcesColors color_type,gdouble *r,gdouble *g,gdouble *b); guint32 bt_ui_resources_get_color_by_machine (const BtMachine *machine,BtUIResourcesMachineColors color_type); GtkAccelGroup * bt_ui_resources_get_accel_group (void);
This class serves as a central storage for colors and icons. It is implemented as a singleton.
typedef enum {
BT_UI_RES_COLOR_CURSOR=0,
BT_UI_RES_COLOR_SELECTION1,
BT_UI_RES_COLOR_SELECTION2,
BT_UI_RES_COLOR_PLAYLINE,
BT_UI_RES_COLOR_LOOPLINE,
BT_UI_RES_COLOR_ENDLINE,
BT_UI_RES_COLOR_SOURCE_MACHINE_BASE, /* machine view normal */
BT_UI_RES_COLOR_SOURCE_MACHINE_BRIGHT1, /* list view odd */
BT_UI_RES_COLOR_SOURCE_MACHINE_BRIGHT2, /* list view even */
BT_UI_RES_COLOR_SOURCE_MACHINE_DARK1, /* machine title */
BT_UI_RES_COLOR_SOURCE_MACHINE_DARK2, /* --- */
BT_UI_RES_COLOR_PROCESSOR_MACHINE_BASE, /* machine view normal */
BT_UI_RES_COLOR_PROCESSOR_MACHINE_BRIGHT1, /* list view odd */
BT_UI_RES_COLOR_PROCESSOR_MACHINE_BRIGHT2, /* list view even */
BT_UI_RES_COLOR_PROCESSOR_MACHINE_DARK1, /* machine title */
BT_UI_RES_COLOR_PROCESSOR_MACHINE_DARK2, /* --- */
BT_UI_RES_COLOR_SINK_MACHINE_BASE, /* machine view normal */
BT_UI_RES_COLOR_SINK_MACHINE_BRIGHT1, /* list view odd */
BT_UI_RES_COLOR_SINK_MACHINE_BRIGHT2, /* list view even */
BT_UI_RES_COLOR_SINK_MACHINE_DARK1, /* --- */
BT_UI_RES_COLOR_SINK_MACHINE_DARK2, /* --- */
BT_UI_RES_COLOR_ANALYZER_PEAK, /* analyzer widnow peak marks */
BT_UI_RES_COLOR_GRID_LINES, /* grid lines */
BT_UI_RES_COLOR_COUNT
} BtUIResourcesColors;
Symbolic color names for the UI.
| cursor color | |
| selection color | |
| shaded selection color | |
| playback line | |
| loop line | |
| song end line | |
| source machine base color | |
| source machine lighter variant | |
| source machine even lighter variant | |
| source machine darker variant | |
| source machine even darker variant | |
| processor machine base color | |
| processor machine lighter variant | |
| processor machine even lighter variant | |
| processor machine darker variant | |
| processor machine even darker variant | |
| sink machine base color | |
| sink machine lighter variant | |
| sink machine even lighter variant | |
| sink machine darker variant | |
| sink machine even darker variant | |
| analyzer peak lines | |
| grid lines | |
| symbolic color count |
typedef enum {
BT_UI_RES_COLOR_MACHINE_BASE=0, /* machine view normal */
BT_UI_RES_COLOR_MACHINE_BRIGHT1, /* list view odd */
BT_UI_RES_COLOR_MACHINE_BRIGHT2, /* list view even */
BT_UI_RES_COLOR_MACHINE_DARK1, /* --- */
BT_UI_RES_COLOR_MACHINE_DARK2 /* --- */
} BtUIResourcesMachineColors;
Symbolic color names for machines.
BtUIResources * bt_ui_resources_new (void);
Create a new instance on first call and return a reference later on.
Returns : |
the new signleton instance |
GdkPixbuf * bt_ui_resources_get_icon_pixbuf_by_machine
(const BtMachine *machine);
Gets a GdkPixbuf image that matches the given machine type for use in menus.
|
the machine to get the image for |
Returns : |
a GdkPixbuf image |
GdkPixbuf * bt_ui_resources_get_machine_graphics_pixbuf_by_machine (const BtMachine *machine,gdouble zoom);
Gets a GdkPixbuf image that matches the given machine type for use on the canvas.
|
the machine to get the image for |
|
scaling factor for the icons |
Returns : |
a GdkPixbuf image |
GtkWidget * bt_ui_resources_get_icon_image_by_machine
(const BtMachine *machine);
Gets a GtkImage that matches the given machine type.
|
the machine to get the image for |
Returns : |
a GtkImage widget |
GtkWidget * bt_ui_resources_get_icon_image_by_machine_type
(GType machine_type);
Gets a GtkImage that matches the given machine type.
|
the machine_type to get the image for |
Returns : |
a GtkImage widget |
GdkColor * bt_ui_resources_get_gdk_color (BtUIResourcesColors color_type);
Gets a prealocated color by id.
|
the color id |
Returns : |
the requested GdkColor. |
void bt_ui_resources_get_rgb_color (BtUIResourcesColors color_type,gdouble *r,gdouble *g,gdouble *b);
Gets a prealocated color by id. Sets the given parts to values from 0.0 to 1.0.
|
the color id |
|
target for red color part |
|
target for green color part |
|
target for blue color part |
guint32 bt_ui_resources_get_color_by_machine (const BtMachine *machine,BtUIResourcesMachineColors color_type);
Gets a colors shade depending on machine type in rgba format.
|
the machine to get the color for |
|
a color shade |
Returns : |
a color depending on machine class and color_type |
GtkAccelGroup * bt_ui_resources_get_accel_group (void);
All windows share one accelerator map.
Returns : |
the shared keyboard accelerator map |