LMMS
Loading...
Searching...
No Matches
calf_plugins::gtk_main_window Class Reference

#include <gtk_main_win.h>

Inheritance diagram for calf_plugins::gtk_main_window:
calf_plugins::main_window_iface calf_plugins::gui_environment calf_utils::config_listener_iface calf_plugins::progress_report_iface calf_plugins::gui_environment_iface

Classes

struct  add_plugin_params

Public Member Functions

 gtk_main_window ()
void set_owner (main_window_owner_iface *_owner)
 Set owner pointer.
void new_plugin (const char *name)
void add_plugin (jack_host *plugin)
 Add the plugin to the window.
void del_plugin (plugin_ctl_iface *plugin)
 Remove the plugin from the window.
void rename_plugin (plugin_ctl_iface *plugin, std::string name)
void set_window (plugin_ctl_iface *iface, plugin_gui_window *window)
 Bind the plugin window to the plugin.
void refresh_all_presets (bool builtin_too)
 Refresh preset lists on all windows (if, for example, a new preset has been created).
void refresh_plugin (plugin_ctl_iface *plugin)
 Refresh the plugin UI.
void refresh_plugin_param (plugin_ctl_iface *plugin, int param_no)
 Refresh the plugin UI.
void on_closed ()
 Called to clean up when host quits.
void open_gui (plugin_ctl_iface *plugin)
void create ()
 Create the actual window associated with this interface.
void create_status_icon ()
 Create the actual window associated with this interface.
void open_file ()
 Default open file operation.
bool save_file ()
 Default save file operation.
bool save_file_as ()
void save_file_from_sighandler ()
void show_rack_ears (bool show)
void show_vu_meters (bool show)
void register_icons ()
virtual void report_progress (float percentage, const std::string &message)
 Implementation of progress_report_iface function.
virtual void add_condition (const std::string &name)
 Mark condition as true.
virtual void show_error (const std::string &text)
 Display an error dialog.
GtkListStore * get_styles ()
void load_style (std::string path)
Public Member Functions inherited from calf_plugins::main_window_iface
virtual ~main_window_iface ()
Public Member Functions inherited from calf_plugins::progress_report_iface
virtual ~progress_report_iface ()
Public Member Functions inherited from calf_plugins::gui_environment
 gui_environment ()
virtual bool check_condition (const char *name)
virtual calf_utils::config_db_ifaceget_config_db ()
virtual calf_utils::gui_configget_config ()
virtual calf_plugins::image_factoryget_image_factory ()
 ~gui_environment ()
Public Member Functions inherited from calf_plugins::gui_environment_iface
virtual ~gui_environment_iface ()
Public Member Functions inherited from calf_utils::config_listener_iface
virtual ~config_listener_iface ()

Public Attributes

GtkWindow * toplevel
GtkWidget * all_vbox
GtkWidget * strips_table
GtkUIManager * ui_mgr
GtkActionGroup * std_actions
GtkActionGroup * plugin_actions
GtkIconFactory * factory
std::map< plugin_ctl_iface *, plugin_strip * > plugins
std::vector< jack_host * > plugin_queue
bool is_closed
bool draw_rackmounts
int source_id
main_window_owner_ifaceowner
calf_utils::config_notifier_ifacenotifier
window_state winstate
image_factory images
Public Attributes inherited from calf_plugins::gui_environment
std::set< std::string > conditions
image_factory images

Protected Member Functions

plugin_stripcreate_strip (jack_host *plugin)
void update_strip (plugin_ctl_iface *plugin)
void sort_strips ()
std::string make_plugin_list (GtkActionGroup *actions)
void display_error (const char *error, const char *filename)
void on_config_change ()
GtkWidget * create_vu_meter ()
GtkWidget * create_meter_scale ()
GtkWidget * create_progress_window ()
 Create a toplevel window with progress bar.

Static Protected Member Functions

static gboolean on_idle (void *data)
static void add_plugin_action (GtkWidget *src, gpointer data)

Protected Attributes

GtkWidget * progress_window
window_update_controller refresh_controller

Static Private Member Functions

static void on_open_action (GtkWidget *widget, gtk_main_window *main)
static void on_save_action (GtkWidget *widget, gtk_main_window *main)
static void on_save_as_action (GtkWidget *widget, gtk_main_window *main)
static void on_preferences_action (GtkWidget *widget, gtk_main_window *main)
static void on_reorder_action (GtkWidget *widget, gtk_main_window *main)
static void on_exit_action (GtkWidget *widget, gtk_main_window *main)
static void on_edit_title (GtkWidget *label, GdkEventButton *event, plugin_strip *strip)
static void on_activate_entry (GtkWidget *entry, plugin_strip *strip)
static gboolean on_blur_entry (GtkWidget *entry, GdkEvent *event, plugin_strip *strip)
static void on_table_clicked (GtkWidget *table, GdkEvent *event)

Static Private Attributes

static const GtkActionEntry actions []

Constructor & Destructor Documentation

◆ gtk_main_window()

gtk_main_window::gtk_main_window ( )

Member Function Documentation

◆ add_condition()

void gtk_main_window::add_condition ( const std::string & name)
virtual

Mark condition as true.

Implements calf_plugins::main_window_iface.

◆ add_plugin()

void gtk_main_window::add_plugin ( jack_host * plugin)
virtual

Add the plugin to the window.

Implements calf_plugins::main_window_iface.

◆ add_plugin_action()

void gtk_main_window::add_plugin_action ( GtkWidget * src,
gpointer data )
staticprotected

◆ create()

void gtk_main_window::create ( )
virtual

Create the actual window associated with this interface.

Implements calf_plugins::main_window_iface.

◆ create_meter_scale()

GtkWidget * gtk_main_window::create_meter_scale ( )
protected

◆ create_progress_window()

GtkWidget * gtk_main_window::create_progress_window ( )
protected

Create a toplevel window with progress bar.

◆ create_status_icon()

void gtk_main_window::create_status_icon ( )
virtual

Create the actual window associated with this interface.

Implements calf_plugins::main_window_iface.

◆ create_strip()

plugin_strip * gtk_main_window::create_strip ( jack_host * plugin)
protected

◆ create_vu_meter()

GtkWidget * gtk_main_window::create_vu_meter ( )
protected

◆ del_plugin()

void gtk_main_window::del_plugin ( plugin_ctl_iface * plugin)
virtual

Remove the plugin from the window.

Implements calf_plugins::main_window_iface.

◆ display_error()

void gtk_main_window::display_error ( const char * error,
const char * filename )
protected

◆ get_styles()

GtkListStore * gtk_main_window::get_styles ( )

◆ load_style()

void gtk_main_window::load_style ( std::string path)

◆ make_plugin_list()

std::string gtk_main_window::make_plugin_list ( GtkActionGroup * actions)
protected

◆ new_plugin()

void calf_plugins::gtk_main_window::new_plugin ( const char * name)
inline

◆ on_activate_entry()

void gtk_main_window::on_activate_entry ( GtkWidget * entry,
plugin_strip * strip )
staticprivate

◆ on_blur_entry()

gboolean gtk_main_window::on_blur_entry ( GtkWidget * entry,
GdkEvent * event,
plugin_strip * strip )
staticprivate

◆ on_closed()

void gtk_main_window::on_closed ( )
virtual

Called to clean up when host quits.

Implements calf_plugins::main_window_iface.

◆ on_config_change()

void gtk_main_window::on_config_change ( )
protectedvirtual

◆ on_edit_title()

void gtk_main_window::on_edit_title ( GtkWidget * label,
GdkEventButton * event,
plugin_strip * strip )
staticprivate

◆ on_exit_action()

void gtk_main_window::on_exit_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_idle()

gboolean gtk_main_window::on_idle ( void * data)
staticprotected

◆ on_open_action()

void gtk_main_window::on_open_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_preferences_action()

void gtk_main_window::on_preferences_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_reorder_action()

void gtk_main_window::on_reorder_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_save_action()

void gtk_main_window::on_save_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_save_as_action()

void gtk_main_window::on_save_as_action ( GtkWidget * widget,
gtk_main_window * main )
staticprivate

◆ on_table_clicked()

void gtk_main_window::on_table_clicked ( GtkWidget * table,
GdkEvent * event )
staticprivate

◆ open_file()

void gtk_main_window::open_file ( )
virtual

Default open file operation.

Implements calf_plugins::main_window_iface.

◆ open_gui()

void gtk_main_window::open_gui ( plugin_ctl_iface * plugin)

◆ refresh_all_presets()

void gtk_main_window::refresh_all_presets ( bool builtin_too)
virtual

Refresh preset lists on all windows (if, for example, a new preset has been created).

Implements calf_plugins::main_window_iface.

◆ refresh_plugin()

void gtk_main_window::refresh_plugin ( plugin_ctl_iface * plugin)
virtual

Refresh the plugin UI.

Implements calf_plugins::main_window_iface.

◆ refresh_plugin_param()

void gtk_main_window::refresh_plugin_param ( plugin_ctl_iface * plugin,
int param_no )
virtual

Refresh the plugin UI.

Implements calf_plugins::main_window_iface.

◆ register_icons()

void gtk_main_window::register_icons ( )

◆ rename_plugin()

void gtk_main_window::rename_plugin ( plugin_ctl_iface * plugin,
std::string name )
virtual

◆ report_progress()

void gtk_main_window::report_progress ( float percentage,
const std::string & message )
virtual

Implementation of progress_report_iface function.

Implements calf_plugins::progress_report_iface.

◆ save_file()

bool gtk_main_window::save_file ( )
virtual

Default save file operation.

Implements calf_plugins::main_window_iface.

◆ save_file_as()

bool gtk_main_window::save_file_as ( )

◆ save_file_from_sighandler()

void calf_plugins::gtk_main_window::save_file_from_sighandler ( )

◆ set_owner()

void calf_plugins::gtk_main_window::set_owner ( main_window_owner_iface * owner)
inlinevirtual

Set owner pointer.

Implements calf_plugins::main_window_iface.

◆ set_window()

void gtk_main_window::set_window ( plugin_ctl_iface * plugin,
plugin_gui_window * window )
virtual

Bind the plugin window to the plugin.

Implements calf_plugins::main_window_iface.

◆ show_error()

void gtk_main_window::show_error ( const std::string & text)
virtual

Display an error dialog.

Implements calf_plugins::main_window_iface.

◆ show_rack_ears()

void gtk_main_window::show_rack_ears ( bool show)

◆ show_vu_meters()

void gtk_main_window::show_vu_meters ( bool show)

◆ sort_strips()

void gtk_main_window::sort_strips ( )
protected

◆ update_strip()

void gtk_main_window::update_strip ( plugin_ctl_iface * plugin)
protected

Member Data Documentation

◆ actions

const GtkActionEntry gtk_main_window::actions
staticprivate
Initial value:
= {
{ "FileMenuAction", NULL, "_File", NULL, "File-related operations", NULL },
{ "FileOpen", GTK_STOCK_OPEN, "_Open", "<Ctrl>O", "Open a rack file", (GCallback)on_open_action },
{ "FileSave", GTK_STOCK_SAVE, "_Save", "<Ctrl>S", "Save a rack file", (GCallback)on_save_action },
{ "FileSaveAs", GTK_STOCK_SAVE_AS, "Save _as...", NULL, "Save a rack file as", (GCallback)on_save_as_action },
{ "HostMenuAction", NULL, "_Host", NULL, "Host-related operations", NULL },
{ "AddPluginMenuAction", NULL, "_Add plugin", NULL, "Add a plugin to the rack", NULL },
{ "FileReorder", NULL, "_Reorder plugins", NULL, "Reorder plugins to minimize latency (experimental)", (GCallback)on_reorder_action },
{ "FilePreferences", GTK_STOCK_PREFERENCES, "_Preferences...", NULL, "Adjust preferences", (GCallback)on_preferences_action },
{ "FileQuit", GTK_STOCK_QUIT, "_Quit", "<Ctrl>Q", "Exit application", (GCallback)on_exit_action },
}
#define NULL
Definition CarlaBridgeFormat.cpp:30
static void on_save_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:72
static void on_preferences_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:87
static void on_reorder_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:82
static void on_save_as_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:77
static void on_open_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:67
static void on_exit_action(GtkWidget *widget, gtk_main_window *main)
Definition gtk_main_win.cpp:155

◆ all_vbox

GtkWidget* calf_plugins::gtk_main_window::all_vbox

◆ draw_rackmounts

bool calf_plugins::gtk_main_window::draw_rackmounts

◆ factory

GtkIconFactory* calf_plugins::gtk_main_window::factory

◆ images

image_factory calf_plugins::gtk_main_window::images

◆ is_closed

bool calf_plugins::gtk_main_window::is_closed

◆ notifier

calf_utils::config_notifier_iface* calf_plugins::gtk_main_window::notifier

◆ owner

main_window_owner_iface* calf_plugins::gtk_main_window::owner

◆ plugin_actions

GtkActionGroup * calf_plugins::gtk_main_window::plugin_actions

◆ plugin_queue

std::vector<jack_host *> calf_plugins::gtk_main_window::plugin_queue

◆ plugins

std::map<plugin_ctl_iface *, plugin_strip *> calf_plugins::gtk_main_window::plugins

◆ progress_window

GtkWidget* calf_plugins::gtk_main_window::progress_window
protected

◆ refresh_controller

window_update_controller calf_plugins::gtk_main_window::refresh_controller
protected

◆ source_id

int calf_plugins::gtk_main_window::source_id

◆ std_actions

GtkActionGroup* calf_plugins::gtk_main_window::std_actions

◆ strips_table

GtkWidget* calf_plugins::gtk_main_window::strips_table

◆ toplevel

GtkWindow* calf_plugins::gtk_main_window::toplevel

◆ ui_mgr

GtkUIManager* calf_plugins::gtk_main_window::ui_mgr

◆ winstate

window_state calf_plugins::gtk_main_window::winstate

The documentation for this class was generated from the following files: