Guitarix
PresetWindow Class Reference

#include <gx_preset_window.h>

Inheritance diagram for PresetWindow:

Public Member Functions

 PresetWindow (Glib::RefPtr< gx_gui::GxBuilder > bld, gx_engine::GxMachineBase &machine, const gx_system::CmdlineOptions &options, GxActions &actions, UIManager &uimanager)
 
 ~PresetWindow ()
 
void on_preset_select (bool v, bool animated, int preset_window_height)
 

Private Types

enum  { TEXT_TARGETS = 0 , MODELROW_TARGET = 1 , URILIST_TARGET = 2 }
 

Private Member Functions

void load_widget_pointers (Glib::RefPtr< gx_gui::GxBuilder > bld)
 
void target_drag_data_received (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, const Gtk::SelectionData &data, guint info, guint timestamp)
 
bool on_target_drag_motion (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, guint timestamp)
 
Glib::ustring get_combo_selection ()
 
void reload_combo ()
 
void on_preset_combo_changed ()
 
bool select_func (const Glib::RefPtr< Gtk::TreeModel > &model, const Gtk::TreePath &path, bool path_currently_selected)
 
void set_cell_text (Gtk::Widget *widget, Gtk::CellRenderer *cell, const Glib::ustring &text, bool selected)
 
void highlight_current_bank (Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter)
 
void text_func (Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter)
 
void on_editing_started (const Gtk::CellEditable *edit, const Glib::ustring &path, Glib::RefPtr< Gtk::TreeModel > &model)
 
void reset_edit (Gtk::TreeViewColumn &col)
 
void on_edit_canceled (Gtk::TreeViewColumn *col)
 
void start_edit (const Gtk::TreeModel::Path &pt, Gtk::TreeViewColumn &col, Gtk::CellRenderer &cell)
 
Gtk::TreeIter get_current_bank_iter ()
 
Glib::ustring get_current_bank ()
 
bool run_message_dialog (Gtk::Widget &w, const Glib::ustring &msg)
 
bool on_bank_button_release (GdkEventButton *ev)
 
void on_bank_edited (const Glib::ustring &path, const Glib::ustring &newtext, Gtk::TreeView *w)
 
bool is_row_separator (const Glib::RefPtr< Gtk::TreeModel > &model, const Gtk::TreeModel::iterator &iter)
 
void on_new_bank ()
 
void on_preset_save ()
 
const std::string pdir ()
 
void on_online_preset ()
 
void show_online_preset ()
 
void popup_pos (int &x, int &y, bool &push_in)
 
void downloadPreset (Gtk::Menu *presetMenu, std::string uri)
 
bool download_file (Glib::ustring from_uri, Glib::ustring to_path)
 
Glib::ustring resolve_hostname ()
 
void create_preset_menu ()
 
void read_preset_menu ()
 
bool on_bank_drag_motion (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, guint timestamp)
 
bool bank_drag_moveable (Gtk::TreePath pt)
 
bool bank_find_drop_position (int x, int y, Gtk::TreeModel::Path &pt, Gtk::TreeViewDropPosition &dst)
 
void on_bank_drag_data_received (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, const Gtk::SelectionData &data, guint info, guint timestamp)
 
void on_bank_drag_data_get (const Glib::RefPtr< Gdk::DragContext > &context, Gtk::SelectionData &selection, int info, int timestamp)
 
void on_bank_changed ()
 
bool on_bank_query_tooltip (int x, int y, bool kb_tooltip, Glib::RefPtr< Gtk::Tooltip > tooltip)
 
void on_bank_reordered (const Gtk::TreeModel::Path &path)
 
bool on_preset_button_release (GdkEventButton *ev)
 
void on_preset_row_activated (const Gtk::TreePath &path, Gtk::TreeViewColumn *column)
 
void on_preset_edited (const Glib::ustring &path, const Glib::ustring &newtext)
 
void on_preset_changed ()
 
bool on_preset_drag_motion (const Glib::RefPtr< Gdk::DragContext > &context, int x, int y, guint timestamp)
 
void on_preset_drag_data_get (const Glib::RefPtr< Gdk::DragContext > &context, Gtk::SelectionData &selection, int info, int timestamp)
 
void on_preset_reordered (const Gtk::TreeModel::Path &path)
 
void autosize ()
 
void on_organize ()
 
bool animate_preset_show ()
 
bool animate_preset_hide ()
 
void set_row_for_presetfile (Gtk::TreeIter i, gx_system::PresetFileGui *f)
 
void display_paned (bool show_preset, int paned_child_height)
 
void on_selection_changed ()
 
void on_presetlist_changed ()
 

Private Attributes

gx_engine::GxMachineBasemachine
 
GxActionsactions
 
Glib::RefPtr< Gtk::AccelGroup > accelgroup
 
CURL * curl
 
bool in_edit
 
Gtk::TreeModel::iterator edit_iter
 
Glib::RefPtr< Gdk::Pixbuf > pb_edit
 
Glib::RefPtr< Gdk::Pixbuf > pb_del
 
Glib::RefPtr< Gdk::Pixbuf > pb_scratch
 
Glib::RefPtr< Gdk::Pixbuf > pb_versiondiff
 
Glib::RefPtr< Gdk::Pixbuf > pb_readonly
 
Glib::RefPtr< Gdk::Pixbuf > pb_factory
 
Glib::RefPtr< PresetStorepstore
 
TargetModelColumns target_col
 
BankModelColumns bank_col
 
int vpaned_pos
 
int vpaned_step
 
int vpaned_target
 
const gx_system::CmdlineOptionsoptions
 
bool in_current_preset
 
bool load_in_progress
 
sigc::connection on_map_conn
 
Gtk::Button * save_preset
 
Gtk::Button * new_preset_bank
 
Gtk::ToggleButton * organize_presets
 
Gtk::Button * online_preset
 
MyTreeViewbank_treeview
 
Gtk::CellRendererText * bank_cellrenderer
 
MyTreeViewpreset_treeview
 
Gtk::CellRendererText * preset_cellrenderer
 
Gtk::ComboBox * banks_combobox
 
MyTreeViewpresets_target_treeview
 
Gtk::Label * preset_title
 
Gtk::ScrolledWindow * presets_target_scrolledbox
 
Gtk::TreeViewColumn * bank_column_flags
 
Gtk::TreeViewColumn * bank_column_bank
 
Gtk::TreeViewColumn * bank_column_edit
 
Gtk::TreeViewColumn * bank_column_delete
 
Gtk::TreeViewColumn * bank_column_spacer
 
Gtk::TreeViewColumn * preset_column_preset
 
Gtk::TreeViewColumn * preset_column_edit
 
Gtk::TreeViewColumn * preset_column_delete
 
Gtk::TreeViewColumn * preset_column_spacer
 
Gtk::Paned * main_vpaned
 
Gtk::ScrolledWindow * preset_scrolledbox
 
std::vector< std::tuple< std::string, std::string, std::string > > olp
 

Detailed Description

Definition at line 76 of file gx_preset_window.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
TEXT_TARGETS 
MODELROW_TARGET 
URILIST_TARGET 

Definition at line 78 of file gx_preset_window.h.

Constructor & Destructor Documentation

◆ PresetWindow()

PresetWindow::PresetWindow ( Glib::RefPtr< gx_gui::GxBuilder bld,
gx_engine::GxMachineBase machine,
const gx_system::CmdlineOptions options,
GxActions actions,
UIManager uimanager 
)

◆ ~PresetWindow()

PresetWindow::~PresetWindow ( )

Member Function Documentation

◆ animate_preset_hide()

bool PresetWindow::animate_preset_hide ( )
private

◆ animate_preset_show()

bool PresetWindow::animate_preset_show ( )
private

◆ autosize()

void PresetWindow::autosize ( )
private

◆ bank_drag_moveable()

bool PresetWindow::bank_drag_moveable ( Gtk::TreePath  pt)
private

◆ bank_find_drop_position()

bool PresetWindow::bank_find_drop_position ( int  x,
int  y,
Gtk::TreeModel::Path &  pt,
Gtk::TreeViewDropPosition &  dst 
)
private

◆ create_preset_menu()

void PresetWindow::create_preset_menu ( )
private

◆ display_paned()

void PresetWindow::display_paned ( bool  show_preset,
int  paned_child_height 
)
private

◆ download_file()

bool PresetWindow::download_file ( Glib::ustring  from_uri,
Glib::ustring  to_path 
)
private

◆ downloadPreset()

void PresetWindow::downloadPreset ( Gtk::Menu *  presetMenu,
std::string  uri 
)
private

◆ get_combo_selection()

Glib::ustring PresetWindow::get_combo_selection ( )
private

◆ get_current_bank()

Glib::ustring PresetWindow::get_current_bank ( )
private

◆ get_current_bank_iter()

Gtk::TreeIter PresetWindow::get_current_bank_iter ( )
inlineprivate

Definition at line 145 of file gx_preset_window.h.

◆ highlight_current_bank()

void PresetWindow::highlight_current_bank ( Gtk::CellRenderer *  cell,
const Gtk::TreeModel::iterator &  iter 
)
private

◆ is_row_separator()

bool PresetWindow::is_row_separator ( const Glib::RefPtr< Gtk::TreeModel > &  model,
const Gtk::TreeModel::iterator &  iter 
)
private

◆ load_widget_pointers()

void PresetWindow::load_widget_pointers ( Glib::RefPtr< gx_gui::GxBuilder bld)
private

◆ on_bank_button_release()

bool PresetWindow::on_bank_button_release ( GdkEventButton *  ev)
private

◆ on_bank_changed()

void PresetWindow::on_bank_changed ( )
private

◆ on_bank_drag_data_get()

void PresetWindow::on_bank_drag_data_get ( const Glib::RefPtr< Gdk::DragContext > &  context,
Gtk::SelectionData &  selection,
int  info,
int  timestamp 
)
private

◆ on_bank_drag_data_received()

void PresetWindow::on_bank_drag_data_received ( const Glib::RefPtr< Gdk::DragContext > &  context,
int  x,
int  y,
const Gtk::SelectionData &  data,
guint  info,
guint  timestamp 
)
private

◆ on_bank_drag_motion()

bool PresetWindow::on_bank_drag_motion ( const Glib::RefPtr< Gdk::DragContext > &  context,
int  x,
int  y,
guint  timestamp 
)
private

◆ on_bank_edited()

void PresetWindow::on_bank_edited ( const Glib::ustring &  path,
const Glib::ustring &  newtext,
Gtk::TreeView *  w 
)
private

◆ on_bank_query_tooltip()

bool PresetWindow::on_bank_query_tooltip ( int  x,
int  y,
bool  kb_tooltip,
Glib::RefPtr< Gtk::Tooltip >  tooltip 
)
private

◆ on_bank_reordered()

void PresetWindow::on_bank_reordered ( const Gtk::TreeModel::Path &  path)
private

◆ on_edit_canceled()

void PresetWindow::on_edit_canceled ( Gtk::TreeViewColumn *  col)
private

◆ on_editing_started()

void PresetWindow::on_editing_started ( const Gtk::CellEditable *  edit,
const Glib::ustring &  path,
Glib::RefPtr< Gtk::TreeModel > &  model 
)
private

◆ on_new_bank()

void PresetWindow::on_new_bank ( )
private

◆ on_online_preset()

void PresetWindow::on_online_preset ( )
private

◆ on_organize()

void PresetWindow::on_organize ( )
private

◆ on_preset_button_release()

bool PresetWindow::on_preset_button_release ( GdkEventButton *  ev)
private

◆ on_preset_changed()

void PresetWindow::on_preset_changed ( )
private

◆ on_preset_combo_changed()

void PresetWindow::on_preset_combo_changed ( )
private

◆ on_preset_drag_data_get()

void PresetWindow::on_preset_drag_data_get ( const Glib::RefPtr< Gdk::DragContext > &  context,
Gtk::SelectionData &  selection,
int  info,
int  timestamp 
)
private

◆ on_preset_drag_motion()

bool PresetWindow::on_preset_drag_motion ( const Glib::RefPtr< Gdk::DragContext > &  context,
int  x,
int  y,
guint  timestamp 
)
private

◆ on_preset_edited()

void PresetWindow::on_preset_edited ( const Glib::ustring &  path,
const Glib::ustring &  newtext 
)
private

◆ on_preset_reordered()

void PresetWindow::on_preset_reordered ( const Gtk::TreeModel::Path &  path)
private

◆ on_preset_row_activated()

void PresetWindow::on_preset_row_activated ( const Gtk::TreePath &  path,
Gtk::TreeViewColumn *  column 
)
private

◆ on_preset_save()

void PresetWindow::on_preset_save ( )
private

◆ on_preset_select()

void PresetWindow::on_preset_select ( bool  v,
bool  animated,
int  preset_window_height 
)

◆ on_presetlist_changed()

void PresetWindow::on_presetlist_changed ( )
private

◆ on_selection_changed()

void PresetWindow::on_selection_changed ( )
private

◆ on_target_drag_motion()

bool PresetWindow::on_target_drag_motion ( const Glib::RefPtr< Gdk::DragContext > &  context,
int  x,
int  y,
guint  timestamp 
)
private

◆ pdir()

const std::string PresetWindow::pdir ( )
inlineprivate

Definition at line 153 of file gx_preset_window.h.

◆ popup_pos()

void PresetWindow::popup_pos ( int &  x,
int &  y,
bool &  push_in 
)
private

◆ read_preset_menu()

void PresetWindow::read_preset_menu ( )
private

◆ reload_combo()

void PresetWindow::reload_combo ( )
private

◆ reset_edit()

void PresetWindow::reset_edit ( Gtk::TreeViewColumn &  col)
private

◆ resolve_hostname()

Glib::ustring PresetWindow::resolve_hostname ( )
private

◆ run_message_dialog()

bool PresetWindow::run_message_dialog ( Gtk::Widget &  w,
const Glib::ustring &  msg 
)
private

◆ select_func()

bool PresetWindow::select_func ( const Glib::RefPtr< Gtk::TreeModel > &  model,
const Gtk::TreePath &  path,
bool  path_currently_selected 
)
private

◆ set_cell_text()

void PresetWindow::set_cell_text ( Gtk::Widget *  widget,
Gtk::CellRenderer *  cell,
const Glib::ustring &  text,
bool  selected 
)
private

◆ set_row_for_presetfile()

void PresetWindow::set_row_for_presetfile ( Gtk::TreeIter  i,
gx_system::PresetFileGui f 
)
private

◆ show_online_preset()

void PresetWindow::show_online_preset ( )
private

◆ start_edit()

void PresetWindow::start_edit ( const Gtk::TreeModel::Path &  pt,
Gtk::TreeViewColumn &  col,
Gtk::CellRenderer &  cell 
)
private

◆ target_drag_data_received()

void PresetWindow::target_drag_data_received ( const Glib::RefPtr< Gdk::DragContext > &  context,
int  x,
int  y,
const Gtk::SelectionData &  data,
guint  info,
guint  timestamp 
)
private

◆ text_func()

void PresetWindow::text_func ( Gtk::CellRenderer *  cell,
const Gtk::TreeModel::iterator &  iter 
)
private

Member Data Documentation

◆ accelgroup

Glib::RefPtr<Gtk::AccelGroup> PresetWindow::accelgroup
private

Definition at line 85 of file gx_preset_window.h.

◆ actions

GxActions& PresetWindow::actions
private

Definition at line 84 of file gx_preset_window.h.

◆ bank_cellrenderer

Gtk::CellRendererText* PresetWindow::bank_cellrenderer
private

Definition at line 112 of file gx_preset_window.h.

◆ bank_col

BankModelColumns PresetWindow::bank_col
private

Definition at line 97 of file gx_preset_window.h.

◆ bank_column_bank

Gtk::TreeViewColumn* PresetWindow::bank_column_bank
private

Definition at line 120 of file gx_preset_window.h.

◆ bank_column_delete

Gtk::TreeViewColumn* PresetWindow::bank_column_delete
private

Definition at line 122 of file gx_preset_window.h.

◆ bank_column_edit

Gtk::TreeViewColumn* PresetWindow::bank_column_edit
private

Definition at line 121 of file gx_preset_window.h.

◆ bank_column_flags

Gtk::TreeViewColumn* PresetWindow::bank_column_flags
private

Definition at line 119 of file gx_preset_window.h.

◆ bank_column_spacer

Gtk::TreeViewColumn* PresetWindow::bank_column_spacer
private

Definition at line 123 of file gx_preset_window.h.

◆ bank_treeview

MyTreeView* PresetWindow::bank_treeview
private

Definition at line 111 of file gx_preset_window.h.

Referenced by get_current_bank_iter().

◆ banks_combobox

Gtk::ComboBox* PresetWindow::banks_combobox
private

Definition at line 115 of file gx_preset_window.h.

◆ curl

CURL* PresetWindow::curl
private

Definition at line 86 of file gx_preset_window.h.

◆ edit_iter

Gtk::TreeModel::iterator PresetWindow::edit_iter
private

Definition at line 88 of file gx_preset_window.h.

◆ in_current_preset

bool PresetWindow::in_current_preset
private

Definition at line 102 of file gx_preset_window.h.

◆ in_edit

bool PresetWindow::in_edit
private

Definition at line 87 of file gx_preset_window.h.

◆ load_in_progress

bool PresetWindow::load_in_progress
private

Definition at line 103 of file gx_preset_window.h.

◆ machine

gx_engine::GxMachineBase& PresetWindow::machine
private

Definition at line 83 of file gx_preset_window.h.

◆ main_vpaned

Gtk::Paned* PresetWindow::main_vpaned
private

Definition at line 128 of file gx_preset_window.h.

◆ new_preset_bank

Gtk::Button* PresetWindow::new_preset_bank
private

Definition at line 108 of file gx_preset_window.h.

◆ olp

std::vector< std::tuple<std::string,std::string,std::string> > PresetWindow::olp
private

Definition at line 162 of file gx_preset_window.h.

◆ on_map_conn

sigc::connection PresetWindow::on_map_conn
private

Definition at line 104 of file gx_preset_window.h.

◆ online_preset

Gtk::Button* PresetWindow::online_preset
private

Definition at line 110 of file gx_preset_window.h.

◆ options

const gx_system::CmdlineOptions& PresetWindow::options
private

Definition at line 101 of file gx_preset_window.h.

Referenced by pdir().

◆ organize_presets

Gtk::ToggleButton* PresetWindow::organize_presets
private

Definition at line 109 of file gx_preset_window.h.

◆ pb_del

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_del
private

Definition at line 90 of file gx_preset_window.h.

◆ pb_edit

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_edit
private

Definition at line 89 of file gx_preset_window.h.

◆ pb_factory

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_factory
private

Definition at line 94 of file gx_preset_window.h.

◆ pb_readonly

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_readonly
private

Definition at line 93 of file gx_preset_window.h.

◆ pb_scratch

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_scratch
private

Definition at line 91 of file gx_preset_window.h.

◆ pb_versiondiff

Glib::RefPtr<Gdk::Pixbuf> PresetWindow::pb_versiondiff
private

Definition at line 92 of file gx_preset_window.h.

◆ preset_cellrenderer

Gtk::CellRendererText* PresetWindow::preset_cellrenderer
private

Definition at line 114 of file gx_preset_window.h.

◆ preset_column_delete

Gtk::TreeViewColumn* PresetWindow::preset_column_delete
private

Definition at line 126 of file gx_preset_window.h.

◆ preset_column_edit

Gtk::TreeViewColumn* PresetWindow::preset_column_edit
private

Definition at line 125 of file gx_preset_window.h.

◆ preset_column_preset

Gtk::TreeViewColumn* PresetWindow::preset_column_preset
private

Definition at line 124 of file gx_preset_window.h.

◆ preset_column_spacer

Gtk::TreeViewColumn* PresetWindow::preset_column_spacer
private

Definition at line 127 of file gx_preset_window.h.

◆ preset_scrolledbox

Gtk::ScrolledWindow* PresetWindow::preset_scrolledbox
private

Definition at line 129 of file gx_preset_window.h.

◆ preset_title

Gtk::Label* PresetWindow::preset_title
private

Definition at line 117 of file gx_preset_window.h.

◆ preset_treeview

MyTreeView* PresetWindow::preset_treeview
private

Definition at line 113 of file gx_preset_window.h.

◆ presets_target_scrolledbox

Gtk::ScrolledWindow* PresetWindow::presets_target_scrolledbox
private

Definition at line 118 of file gx_preset_window.h.

◆ presets_target_treeview

MyTreeView* PresetWindow::presets_target_treeview
private

Definition at line 116 of file gx_preset_window.h.

◆ pstore

Glib::RefPtr<PresetStore> PresetWindow::pstore
private

Definition at line 95 of file gx_preset_window.h.

◆ save_preset

Gtk::Button* PresetWindow::save_preset
private

Definition at line 107 of file gx_preset_window.h.

◆ target_col

TargetModelColumns PresetWindow::target_col
private

Definition at line 96 of file gx_preset_window.h.

◆ vpaned_pos

int PresetWindow::vpaned_pos
private

Definition at line 98 of file gx_preset_window.h.

◆ vpaned_step

int PresetWindow::vpaned_step
private

Definition at line 99 of file gx_preset_window.h.

◆ vpaned_target

int PresetWindow::vpaned_target
private

Definition at line 100 of file gx_preset_window.h.


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