Ardour  9.0-pre0-822-g12e3bc5c20
ArdourWidgets::MetaButton Class Reference

#include <metabutton.h>

Inheritance diagram for ArdourWidgets::MetaButton:
[legend]

Classes

class  MetaElement
 
class  MetaMenuItem
 

Public Member Functions

 MetaButton ()
 
virtual ~MetaButton ()
 
void add_item (std::string const &label, std::string const &menutext, sigc::slot< void > const &)
 
void clear_items ()
 
void set_active (std::string const &)
 
void set_index (guint)
 
guint index () const
 
- Public Member Functions inherited from ArdourWidgets::ArdourButton
 ArdourButton (Element e=default_elements, bool toggle=false)
 
 ArdourButton (const std::string &, Element e=default_elements, bool toggle=false)
 
virtual ~ArdourButton ()
 
Tweaks tweaks () const
 
void set_tweaks (Tweaks)
 
void set_active_state (Gtkmm2ext::ActiveState)
 
void set_visual_state (Gtkmm2ext::VisualState)
 
void set_custom_led_color (const uint32_t c, const bool useit=true)
 
void set_act_on_release (bool onRelease)
 
Element elements () const
 
void set_elements (Element)
 
void add_elements (Element)
 
void remove_elements (Element)
 
ArdourIcon::Icon icon () const
 
void set_icon (ArdourIcon::Icon)
 
void set_icon (rendercallback_t, void *)
 
void set_corner_radius (float)
 
void set_text (const std::string &, bool markup=false)
 
const std::string & get_text () const
 
bool get_markup () const
 
void set_angle (const double)
 
void set_alignment (const float, const float)
 
void get_alignment (float &xa, float &ya)
 
void set_led_left (bool yn)
 
void set_distinct_led_click (bool yn)
 
void set_layout_ellipsize_width (int w)
 
void set_layout_font (const Pango::FontDescription &)
 
void set_text_ellipsize (Pango::EllipsizeMode)
 
void set_width_padding (float)
 
void set_sizing_text (std::string const &)
 
void add_sizing_text (std::string const &)
 
void set_sizing_texts (std::vector< std::string > const &)
 
std::shared_ptr< PBD::Controllableget_controllable ()
 
void set_controllable (std::shared_ptr< PBD::Controllable > c)
 
void watch ()
 
void set_related_action (Glib::RefPtr< Gtk::Action >)
 
bool on_button_press_event (GdkEventButton *)
 
bool on_button_release_event (GdkEventButton *)
 
bool on_touch_begin_event (GdkEventTouch *)
 
bool on_touch_end_event (GdkEventTouch *)
 
void set_image (const Glib::RefPtr< Gdk::Pixbuf > &)
 
void set_fixed_colors (const uint32_t active_color, const uint32_t inactive_color)
 
void set_active_color (const uint32_t active_color)
 
void set_inactive_color (const uint32_t inactive_color)
 
void reset_fixed_colors ()
 
void set_fallthrough_to_parent (bool fall)
 
unsigned int char_pixel_width ()
 
unsigned int char_pixel_height ()
 
float char_avg_pixel_width ()
 
- Public Member Functions inherited from CairoWidget
 CairoWidget ()
 
virtual ~CairoWidget ()
 
void set_canvas_widget ()
 
void use_nsglview (bool retina=true)
 
void use_image_surface (bool yn=true)
 
void queue_draw ()
 
void queue_resize ()
 
int get_width () const
 
int get_height () const
 
void size_allocate (Gtk::Allocation &)
 
void set_dirty (cairo_rectangle_t *area=0)
 
Gtkmm2ext::ActiveState active_state () const
 
Gtkmm2ext::VisualState visual_state () const
 
void unset_active_state ()
 
void unset_visual_state ()
 
void set_active (bool)
 
bool get_active () const
 
void set_draw_background (bool yn)
 
uint32_t background_color ()
 
- Public Member Functions inherited from Gtkmm2ext::CairoCanvas
virtual ~CairoCanvas ()
 
- Public Member Functions inherited from Gtkmm2ext::Activatable
virtual ~Activatable ()
 
Glib::RefPtr< Gtk::Action > get_related_action ()
 

Protected Member Functions

bool on_button_press_event (GdkEventButton *)
 
bool on_motion_notify_event (GdkEventMotion *)
 
void menu_size_request (Gtk::Requisition *)
 
void render (Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
 
- Protected Member Functions inherited from ArdourWidgets::ArdourButton
void on_size_request (Gtk::Requisition *req)
 
void on_size_allocate (Gtk::Allocation &)
 
void on_style_changed (const Glib::RefPtr< Gtk::Style > &)
 
void on_name_changed ()
 
void on_realize ()
 
bool on_enter_notify_event (GdkEventCrossing *)
 
bool on_leave_notify_event (GdkEventCrossing *)
 
bool on_grab_broken_event (GdkEventGrabBroken *)
 
bool on_focus_in_event (GdkEventFocus *)
 
bool on_focus_out_event (GdkEventFocus *)
 
bool on_key_release_event (GdkEventKey *)
 
bool on_key_press_event (GdkEventKey *)
 
void controllable_changed ()
 
void set_text_internal ()
 
void recalc_char_pixel_geometry ()
 
void setup_led_rect ()
 
void set_colors ()
 
void color_handler ()
 
void build_patterns ()
 
void ensure_layout ()
 
void action_toggled ()
 
void action_sensitivity_changed ()
 
void action_visibility_changed ()
 
void action_tooltip_changed ()
 
- Protected Member Functions inherited from CairoWidget
virtual bool on_expose_event (GdkEventExpose *)
 
void on_size_allocate (Gtk::Allocation &)
 
void on_state_changed (Gtk::StateType)
 
void on_style_changed (const Glib::RefPtr< Gtk::Style > &)
 
void on_realize ()
 
bool on_button_press_event (GdkEventButton *)
 
Gdk::Color get_parent_bg ()
 
void on_map ()
 
void on_unmap ()
 

Private Member Functions

void activate_item (MetaMenuItem const *)
 
void update_button (MetaMenuItem const *)
 

Private Attributes

Gtk::Menu _menu
 
guint _active
 
bool _hover_dropdown
 

Additional Inherited Members

- Public Types inherited from ArdourWidgets::ArdourButton
enum  Element {
  Edge = 0x001 , Body = 0x002 , Text = 0x004 , Indicator = 0x008 ,
  ColorBox = 0x018 , Menu = 0x020 , MetaMenu = 0x040 , Inactive = 0x080 ,
  VectorIcon = 0x100 , IconRenderCallback = 0x200
}
 
enum  Tweaks {
  Square = 0x01 , TrackHeader = 0x02 , OccasionalText = 0x04 , OccasionalLED = 0x08 ,
  ForceBoxy = 0x10 , ForceFlat = 0x20 , ExpandtoSquare = 0x40
}
 
typedef void(* rendercallback_t) (cairo_t *, int, int, uint32_t, void *)
 
- Static Public Member Functions inherited from ArdourWidgets::ArdourButton
static void set_default_tweaks (Tweaks t)
 
- Static Public Member Functions inherited from CairoWidget
static void provide_background_for_cairo_widget (Gtk::Widget &w, const Gdk::Color &bg)
 
static void set_source_rgb_a (cairo_t *cr, Gdk::Color, float a=1.0)
 
static void set_source_rgb_a (cairo_t *cr, Gtkmm2ext::Color, float a=1.0)
 
static void set_focus_handler (sigc::slot< void, Gtk::Widget * >)
 
- Static Public Member Functions inherited from Gtkmm2ext::CairoTheme
static void set_flat_buttons (bool yn)
 
static void set_boxy_buttons (bool yn)
 
static void set_widget_prelight (bool yn)
 
static bool flat_buttons ()
 
static bool boxy_buttons ()
 
static bool widget_prelight ()
 
- Public Attributes inherited from ArdourWidgets::ArdourButton
sigc::signal< void, GdkEventButton * > signal_led_clicked
 
sigc::signal< void > signal_clicked
 
- Public Attributes inherited from CairoWidget
sigc::signal< void > StateChanged
 
sigc::signal< bool > QueueDraw
 
sigc::signal< bool > QueueResize
 
- Static Public Attributes inherited from ArdourWidgets::ArdourButton
static Element default_elements
 
static Element led_default_elements
 
static Element just_led_default_elements
 
static Tweaks default_tweaks
 
- Protected Attributes inherited from ArdourWidgets::ArdourButton
PBD::ScopedConnection watch_connection
 
Glib::RefPtr< Pango::Layout > _layout
 
Glib::RefPtr< Gdk::Pixbuf > _pixbuf
 
std::string _text
 
std::vector< std::string > _sizing_texts
 
bool _markup
 
Element _elements
 
ArdourIcon::Icon _icon
 
rendercallback_t _icon_render_cb
 
void * _icon_render_cb_data
 
Tweaks _tweaks
 
BindingProxy binding_proxy
 
unsigned int _char_pixel_width
 
unsigned int _char_pixel_height
 
float _char_avg_pixel_width
 
float _width_padding
 
bool _custom_font_set
 
int _text_width
 
int _text_height
 
float _diameter
 
float _corner_radius
 
int _corner_mask
 
double _angle
 
float _xalign
 
float _yalign
 
uint32_t fill_inactive_color
 
uint32_t fill_active_color
 
uint32_t text_active_color
 
uint32_t text_inactive_color
 
uint32_t led_active_color
 
uint32_t led_inactive_color
 
uint32_t led_custom_color
 
bool use_custom_led_color
 
uint32_t outline_color
 
std::optional< int > _squaresize
 
cairo_pattern_t * convex_pattern
 
cairo_pattern_t * concave_pattern
 
cairo_pattern_t * led_inset_pattern
 
cairo_rectangle_t * _led_rect
 
bool _act_on_release
 
bool _auto_toggle
 
bool _led_left
 
bool _distinct_led_click
 
bool _hovering
 
bool _focused
 
int _fixed_colors_set
 
bool _fallthrough_to_parent
 
int _layout_ellipsize_width
 
Pango::EllipsizeMode _ellipsis
 
bool _update_colors
 
int _pattern_height
 
- Protected Attributes inherited from CairoWidget
Gtkmm2ext::ActiveState _active_state
 
Gtkmm2ext::VisualState _visual_state
 
bool _need_bg
 
bool _grabbed
 
- Protected Attributes inherited from Gtkmm2ext::Activatable
Glib::RefPtr< Gtk::Action > _action
 
- Static Protected Attributes inherited from CairoWidget
static sigc::slot< void, Gtk::Widget * > focus_handler
 

Detailed Description

Definition at line 29 of file metabutton.h.

Constructor & Destructor Documentation

◆ MetaButton()

ArdourWidgets::MetaButton::MetaButton ( )

◆ ~MetaButton()

virtual ArdourWidgets::MetaButton::~MetaButton ( )
virtual

Member Function Documentation

◆ activate_item()

void ArdourWidgets::MetaButton::activate_item ( MetaMenuItem const *  )
private

◆ add_item()

void ArdourWidgets::MetaButton::add_item ( std::string const &  label,
std::string const &  menutext,
sigc::slot< void > const &   
)

◆ clear_items()

void ArdourWidgets::MetaButton::clear_items ( )

◆ index()

guint ArdourWidgets::MetaButton::index ( ) const
inline

Definition at line 41 of file metabutton.h.

◆ menu_size_request()

void ArdourWidgets::MetaButton::menu_size_request ( Gtk::Requisition *  )
protected

◆ on_button_press_event()

bool ArdourWidgets::MetaButton::on_button_press_event ( GdkEventButton *  )
protected

◆ on_motion_notify_event()

bool ArdourWidgets::MetaButton::on_motion_notify_event ( GdkEventMotion *  )
protected

◆ render()

void ArdourWidgets::MetaButton::render ( Cairo::RefPtr< Cairo::Context > const &  ,
cairo_rectangle_t *   
)
protectedvirtual

Reimplemented from ArdourWidgets::ArdourButton.

◆ set_active()

void ArdourWidgets::MetaButton::set_active ( std::string const &  )

◆ set_index()

void ArdourWidgets::MetaButton::set_index ( guint  )

◆ update_button()

void ArdourWidgets::MetaButton::update_button ( MetaMenuItem const *  )
private

Member Data Documentation

◆ _active

guint ArdourWidgets::MetaButton::_active
private

Definition at line 103 of file metabutton.h.

◆ _hover_dropdown

bool ArdourWidgets::MetaButton::_hover_dropdown
private

Definition at line 104 of file metabutton.h.

◆ _menu

Gtk::Menu ArdourWidgets::MetaButton::_menu
private

Definition at line 102 of file metabutton.h.


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