Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstutils.cc File Reference
#include "bstmarshal.h"
#include "bstmarshal.cc"
#include "bstutils.hh"
#include "bstgconfig.hh"
#include "bstmenus.hh"
#include "bsttrackview.hh"
#include "bstwaveview.hh"
#include "bstsoundfontview.hh"
#include "bstpartview.hh"
#include "bstbusmixer.hh"
#include "bstbuseditor.hh"
#include "bstbusview.hh"
#include "bstpianoroll.hh"
#include "bstpatternview.hh"
#include "bsteventroll.hh"
#include "bstgrowbar.hh"
#include "bstdbmeter.hh"
#include "bstscrollgraph.hh"
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include "beast-gtk/icons/bst-stock-gen.cc"
#include "beast-gtk/res/beast-resources.cc"
#include <sfi/sfistore.hh>
#include "bstserverapi.cc"
Include dependency graph for bstutils.cc:

Macros

#define SPACING
 
#define GMASK_GET(o)
 

Functions

int Bst::event_loop_run ()
 
void Bst::event_loop_quit (uint8 exit_code)
 
void _bst_init_utils (void)
 
void _bst_init_radgets (void)
 
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)
 
void bst_status_set_error (Bse::Error error, const std::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_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_vpack (const gchar *first_location,...)
 
GtkWidget * bst_hpack (const gchar *first_location,...)
 
GtkWidget * bst_vpack0 (const gchar *first_location,...)
 
GtkWidget * bst_hpack0 (const gchar *first_location,...)
 
void bst_action_list_add_cat (GxkActionList *alist, const Bse::Category &cat, uint skip_levels, const char *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, void *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_pred (const Bse::CategorySeq &cseq, guint skip_levels, const gchar *stock_fallback, GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data, BstActionListCategoryP predicate, gpointer predicate_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)
 
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)
 
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)
 
gchar * bst_file_scan_find_key (const gchar *file, const gchar *key, const gchar *value_prefix)
 
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_move (GdkEvent *event)
 
bool bst_mouse_button_context (GdkEvent *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: