Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstutils.hh File Reference
#include "bstbseutils.hh"
#include "bstdefs.hh"
#include "bstcluehunter.hh"
#include "bstserverapi.hh"
#include "bstmarshal.h"
#include "beast-gtk/icons/bst-stock-gen.h"
Include dependency graph for bstutils.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define bst_status_eprintf(error, ...)
 
#define bst_pixbuf_no_icon()
 
#define bst_pixbuf_ladspa()
 
#define bst_pixbuf_knob()
 
#define bst_gmask_form_big(c, a)
 
#define bst_gmask_set_sensitive(mask, sensitive)
 
#define bst_gmask_destroy(mask)
 
#define bst_gmask_ref
 
#define bst_gmask_unref
 
#define bst_object_class_install_property(oclass, group, property_id, pspec)
 
#define BST_STOCK_QUESTION
 
#define BST_STOCK_WARNING
 
#define BST_STOCK_ERROR
 
#define BST_STOCK_NEW
 
#define BST_STOCK_OPEN
 
#define BST_STOCK_MERGE
 
#define BST_STOCK_SAVE
 
#define BST_STOCK_SAVE_AS
 
#define BST_STOCK_PREFERENCES
 
#define BST_STOCK_QUIT
 
#define BST_STOCK_CLEAR_UNDO
 
#define BST_STOCK_PREFERENCES
 
#define BST_STOCK_PLAY
 
#define BST_STOCK_STOP
 
#define BST_STOCK_REMOVE_SYNTH
 
#define BST_STOCK_DOC_INDEX
 
#define BST_STOCK_DOC_NEWS
 
#define BST_STOCK_HELP
 
#define BST_STOCK_DOC_FAQ
 
#define BST_STOCK_DOC_DEVEL
 
#define BST_STOCK_ABOUT
 
#define BST_STOCK_ONLINE_HELP_DESK
 
#define BST_STOCK_ONLINE_BUGS
 
#define BST_STOCK_ONLINE_BEAST_SITE
 
#define BST_STOCK_ONLINE_SOUND_ARCHIVE
 
#define BST_STOCK_ADD
 
#define BST_STOCK_REMOVE
 
#define BST_STOCK_SELECT_ALL
 
#define BST_STOCK_SELECT_NONE
 
#define BST_STOCK_SELECT_INVERT
 
#define BST_STOCK_NONE
 
#define BST_STOCK_APPLY
 
#define BST_STOCK_CANCEL
 
#define BST_STOCK_CDROM
 
#define BST_STOCK_CLONE
 
#define BST_STOCK_CLOSE
 
#define BST_STOCK_DEFAULT_REVERT
 
#define BST_STOCK_DELETE
 
#define BST_STOCK_DISMISS
 
#define BST_STOCK_EXECUTE
 
#define BST_STOCK_OK
 
#define BST_STOCK_OVERWRITE
 
#define BST_STOCK_REDO
 
#define BST_STOCK_REVERT
 
#define BST_STOCK_UNDO
 
#define BST_STOCK_ZOOM_100
 
#define BST_STOCK_ZOOM_FIT
 
#define BST_STOCK_ZOOM_IN
 
#define BST_STOCK_ZOOM_OUT
 
#define BST_GCONFIG(field)
 

Typedefs

typedef gboolean(* BstActionListCategoryP) (gpointer predicate_data, const Bse::Category &cat)
 
typedef struct _BstGMask BstGMask
 

Enumerations

enum  BstGMaskPack {
  BST_GMASK_FIT, BST_GMASK_FILL, BST_GMASK_INTERLEAVE, BST_GMASK_BIG,
  BST_GMASK_CENTER, BST_GMASK_MULTI_SPAN
}
 

Functions

int Bst::event_loop_run ()
 
void Bst::event_loop_quit (uint8 exit_code)
 
void bst_status_set_error (Bse::Error error, const String &message)
 
void bst_gui_error_bell (gpointer widget)
 
void bst_window_sync_title_to_proxy (gpointer window, SfiProxy proxy, const gchar *title_format)
 
void bst_container_set_named_child (GtkWidget *container, GQuark qname, GtkWidget *child)
 
GtkWidget * bst_container_get_named_child (GtkWidget *container, GQuark qname)
 
GtkWidget * bst_xpm_view_create (const gchar **xpm, GtkWidget *colormap_widget)
 
GtkWidget * bst_vpack (const gchar *first_location,...) G_GNUC_NULL_TERMINATED
 
GtkWidget * bst_hpack (const gchar *first_location,...) G_GNUC_NULL_TERMINATED
 
GtkWidget * bst_vpack0 (const gchar *first_location,...) G_GNUC_NULL_TERMINATED
 
GtkWidget * bst_hpack0 (const gchar *first_location,...) G_GNUC_NULL_TERMINATED
 
void bst_action_list_add_cat (GxkActionList *alist, const Bse::Category &cat, uint skip_levels, const char *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data)
 
void bst_action_list_add_module (GxkActionList *alist, const Bse::AuxData &ad, const Bse::Icon &icon, const char *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data)
 
GxkActionList * bst_action_list_from_cats (const Bse::CategorySeq &cseq, guint skip_levels, const gchar *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data)
 
GxkActionList * bst_action_list_from_cats_pred (const Bse::CategorySeq &cseq, guint skip_levels, const gchar *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data, BstActionListCategoryP predicate, gpointer predicate_data)
 
void bst_background_handler1_add (gboolean(*handler)(gpointer data), gpointer data, void(*free_func)(gpointer data))
 
void bst_background_handler2_add (gboolean(*handler)(gpointer data), gpointer data, void(*free_func)(gpointer data))
 
GtkWidget * bst_stock_button (const gchar *stock_id)
 
GtkWidget * bst_stock_dbutton (const gchar *stock_id)
 
GtkWidget * bst_stock_icon_button (const gchar *stock_id)
 
void bst_stock_register_icon (const String &stock_id, uint bytes_per_pixel, uint width, uint height, uint rowstride, const uint8 *pixels)
 
gchar * bst_file_scan_find_key (const gchar *file, const gchar *key, const gchar *value_prefix)
 
GtkWidget * bst_gmask_container_create (guint border_width, gboolean dislodge_columns)
 
BstGMask * bst_gmask_form (GtkWidget *gmask_container, GtkWidget *action, BstGMaskPack gpack)
 
void bst_gmask_set_tip (BstGMask *mask, const gchar *tip_text)
 
void bst_gmask_set_prompt (BstGMask *mask, gpointer widget)
 
void bst_gmask_set_aux1 (BstGMask *mask, gpointer widget)
 
void bst_gmask_set_aux2 (BstGMask *mask, gpointer widget)
 
void bst_gmask_set_aux3 (BstGMask *mask, gpointer widget)
 
void bst_gmask_set_column (BstGMask *mask, guint column)
 
GtkWidget * bst_gmask_get_prompt (BstGMask *mask)
 
GtkWidget * bst_gmask_get_aux1 (BstGMask *mask)
 
GtkWidget * bst_gmask_get_aux2 (BstGMask *mask)
 
GtkWidget * bst_gmask_get_aux3 (BstGMask *mask)
 
GtkWidget * bst_gmask_get_action (BstGMask *mask)
 
void bst_gmask_foreach (BstGMask *mask, gpointer func, gpointer data)
 
void bst_gmask_pack (BstGMask *mask)
 
BstGMask * bst_gmask_quick (GtkWidget *gmask_container, guint column, const gchar *prompt, gpointer action, const gchar *tip_text)
 
Bst::GConfig * bst_gconfig_get_global (void)
 
void _bst_init_utils (void)
 
void _bst_init_radgets (void)
 
bool bst_mouse_button_activate (GdkEvent *event)
 
bool bst_mouse_button_activate1 (GdkEvent *event)
 
bool bst_mouse_button_activate2 (GdkEvent *event)
 
bool bst_mouse_button_context (GdkEvent *event)
 
bool bst_mouse_button_move (GdkEvent *event)
 
bool bst_mouse_button_activate (GdkEventButton *event)
 
bool bst_mouse_button_activate1 (GdkEventButton *event)
 
bool bst_mouse_button_activate2 (GdkEventButton *event)
 
bool bst_mouse_button_context (GdkEventButton *event)
 
bool bst_mouse_button_move (GdkEventButton *event)
 

Variables

Bse::ServerH bse_server
 

Function Documentation

GtkWidget* bst_gmask_container_create ( guint  border_width,
gboolean  dislodge_columns 
)
Parameters
border_widthBorder width of this GUI mask
dislodge_columnsProvide expandable space between columns
Returns
GUI field mask container

Create a container capable to hold GUI field masks. This is the container to be passed into bst_gmask_form(). In case multiple field mask columns are packed into the container (by using bst_gmask_set_column() on the filed masks), dislodge_columns specifies whether the field mask columns are to be closely aligned.

void bst_gmask_foreach ( BstGMask *  mask,
gpointer  func,
gpointer  data 
)
Parameters
maskvalid BstGMask
funcforeach function as: void func(GtkWidget*, gpointer data);
datadata passed in to func

Invoke func() with each of the widgets set for this field mask.

Here is the call graph for this function:

BstGMask* bst_gmask_form ( GtkWidget *  gmask_container,
GtkWidget *  action,
BstGMaskPack  gpack 
)
Parameters
gmask_containercontainer created with bst_gmask_container_create()
actionvalid GtkWidget
gpackBstGMaskPack packing type
Returns
a new GUI field mask

Create a new GUI field mask with action as action widget. Each GUI field mask consists of an action widget which may be neighboured by pre and post action widgets, the action widget is usually something like a GtkEntry input widget. Also, most field masks have a prompt widget, usually a GtkLabel, labeling the field mask with a name. Optionally, up to three auxillary widgets are supported per field mask, layed out between the prompt and the action widgets. The second auxillary widget will expand if additional space is available. Other layout details are configured through the gpack packing type:

  • BST_GMASK_FIT - the action widget is not expanded,
  • BST_GMASK_INTERLEAVE - allow the action widget to expand across auxillary columns if it requests that much space,
  • BST_GMASK_BIG - force expansion of the action widget across all possible columns up to the prompt,
  • BST_GMASK_CENTER - center the action widget within space across all possible columns up to the prompt.
  • BST_GMASK_MULTI_SPAN - span aux2 widget across multiple gmask columns.

Referenced by bst_gmask_quick().

Here is the caller graph for this function:

GtkWidget* bst_gmask_get_action ( BstGMask *  mask)
Parameters
maskvalid BstGMask
Returns
the requested GtkWidget or NULL

Retrieve the action widget of this GUI field mask.

GtkWidget* bst_gmask_get_aux1 ( BstGMask *  mask)
Parameters
maskvalid BstGMask
Returns
the requested GtkWidget or NULL

Retrieve the first auxillary widget of this GUI field mask.

GtkWidget* bst_gmask_get_aux2 ( BstGMask *  mask)
Parameters
maskvalid BstGMask
Returns
the requested GtkWidget or NULL

Retrieve the second auxillary widget of this GUI field mask.

GtkWidget* bst_gmask_get_aux3 ( BstGMask *  mask)
Parameters
maskvalid BstGMask
Returns
the requested GtkWidget or NULL

Retrieve the third auxillary widget of this GUI field mask.

GtkWidget* bst_gmask_get_prompt ( BstGMask *  mask)
Parameters
maskvalid BstGMask
Returns
the requested GtkWidget or NULL

Retrieve the prompt widget of this GUI field mask.

void bst_gmask_pack ( BstGMask *  mask)
Parameters
maskvalid BstGMask

After the GUI field mask is fully configured, by setting all associated widgets on it, column tooltip text, etc., this function actually packs it into its container. The field mask setters shouldn't be used after this point.

Referenced by bst_gmask_quick().

Here is the call graph for this function:

Here is the caller graph for this function:

BstGMask* bst_gmask_quick ( GtkWidget *  gmask_container,
guint  column,
const gchar *  prompt,
gpointer  action,
const gchar *  tip_text 
)
Parameters
gmask_containercontainer created with bst_gmask_container_create()
columncolumn number for bst_gmask_set_column()
promptvalid GtkWidget for bst_gmask_set_prompt()
actionvalid GtkWidget as with bst_gmask_form()
tip_texttext for bst_gmask_set_tip()
Returns
an already packed GUI field mask

Shorthand to form a GUI field mask in column of type BST_GMASK_INTERLEAVE, with prompt and tip_text. Note that this function already calls bst_gmask_pack(), so the returned field mask already can't be modified anymore.

Here is the call graph for this function:

void bst_gmask_set_aux1 ( BstGMask *  mask,
gpointer  widget 
)
Parameters
maskvalid BstGMask
widgetvalid GtkWidget

Set the first auxillary widget of this GUI field mask.

void bst_gmask_set_aux2 ( BstGMask *  mask,
gpointer  widget 
)
Parameters
maskvalid BstGMask
widgetvalid GtkWidget

Set the second auxillary widget of this GUI field mask. In contrast to the first and third auxillary widget, this one is expanded if extra space is available.

void bst_gmask_set_aux3 ( BstGMask *  mask,
gpointer  widget 
)
Parameters
maskvalid BstGMask
widgetvalid GtkWidget

Set the third auxillary widget of this GUI field mask.

void bst_gmask_set_column ( BstGMask *  mask,
guint  column 
)
Parameters
maskvalid BstGMask
columncolumn number

Set the field mask column. By default all field masks are packed into column 0, so that only vertical packing occours.

Referenced by bst_gmask_quick().

Here is the caller graph for this function:

void bst_gmask_set_prompt ( BstGMask *  mask,
gpointer  widget 
)
Parameters
maskvalid BstGMask
widgetvalid GtkWidget

Set the prompt widget of this GUI field mask.

Referenced by bst_gmask_quick().

Here is the caller graph for this function:

void bst_gmask_set_tip ( BstGMask *  mask,
const gchar *  tip_text 
)
Parameters
maskvalid BstGMask
tip_texttooltip text

Set the tooltip text of this GUI field mask.

Referenced by bst_gmask_quick().

Here is the caller graph for this function: