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

#include <ardour_fader.h>

Inheritance diagram for ArdourWidgets::ArdourFader:
[legend]

Classes

struct  FaderImage
 

Public Member Functions

 ArdourFader (Gtk::Adjustment &adjustment, int orientation, int span, int girth)
 
virtual ~ArdourFader ()
 
void set_default_value (float)
 
void set_text (const std::string &, bool centered=true, bool expose=true)
 
void set_bg (Gtkmm2ext::Color)
 
void set_fg (Gtkmm2ext::Color)
 
void unset_bg ()
 
void unset_fg ()
 
- Public Member Functions inherited from ArdourWidgets::FaderWidget
 FaderWidget (Gtk::Adjustment &, int orient)
 
virtual ~FaderWidget ()
 
void set_tweaks (Tweaks)
 
Tweaks tweaks () const
 
int orientation () const
 
- 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
 
virtual void set_active_state (Gtkmm2ext::ActiveState)
 
virtual void set_visual_state (Gtkmm2ext::VisualState)
 
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 ()
 

Static Public Member Functions

static void flush_pattern_cache ()
 
- 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 ()
 

Protected Member Functions

void on_size_request (GtkRequisition *)
 
void on_size_allocate (Gtk::Allocation &alloc)
 
void render (Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
 
bool on_motion_notify_event (GdkEventMotion *)
 
bool on_touch_update_event (GdkEventTouch *)
 
void on_state_changed (Gtk::StateType)
 
void on_style_changed (const Glib::RefPtr< Gtk::Style > &)
 
- Protected Member Functions inherited from ArdourWidgets::FaderWidget
bool on_button_press_event (GdkEventButton *)
 
bool on_button_release_event (GdkEventButton *)
 
bool on_touch_begin_event (GdkEventTouch *)
 
bool on_touch_end_event (GdkEventTouch *)
 
bool on_enter_notify_event (GdkEventCrossing *ev)
 
bool on_leave_notify_event (GdkEventCrossing *ev)
 
bool on_scroll_event (GdkEventScroll *ev)
 
bool on_grab_broken_event (GdkEventGrabBroken *)
 
void adjustment_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 ()
 
virtual void on_name_changed ()
 

Private Member Functions

Gdk::Color get_parent_bg ()
 
void create_patterns ()
 
void set_adjustment_from_event (GdkEventButton *)
 
void update_unity_position ()
 
int display_span ()
 
Gdk::Color bg_color (Gtk::StateType)
 
Gdk::Color fg_color (Gtk::StateType)
 

Static Private Member Functions

static cairo_pattern_t * find_pattern (double afr, double afg, double afb, double abr, double abg, double abb, int w, int h)
 

Private Attributes

Glib::RefPtr< Pango::Layout > _layout
 
std::string _text
 
int _text_width
 
int _text_height
 
int _span
 
int _girth
 
int _min_span
 
int _min_girth
 
cairo_pattern_t * _pattern
 
int _unity_loc
 
bool _centered_text
 
sigc::connection _parent_style_change
 
Widget * _current_parent
 
Gtkmm2ext::Color explicit_bg
 
bool have_explicit_bg
 
Gtkmm2ext::Color explicit_fg
 
bool have_explicit_fg
 
uint32_t outline_color
 

Static Private Attributes

static std::list< FaderImage * > _patterns
 

Additional Inherited Members

- Public Types inherited from ArdourWidgets::FaderWidget
enum  Tweaks { NoShowUnityLine = 0x1 , NoButtonForward = 0x2 , NoVerticalScroll = 0x4 , DoubleClickReset = 0x8 }
 
enum  Orientation { VERT , HORIZ }
 
- Public Attributes inherited from ArdourWidgets::FaderWidget
sigc::signal< void, int > StartGesture
 
sigc::signal< void, int > StopGesture
 
sigc::signal< void > OnExpose
 
- Public Attributes inherited from CairoWidget
sigc::signal< void > StateChanged
 
sigc::signal< bool > QueueDraw
 
sigc::signal< bool > QueueResize
 
- Protected Attributes inherited from ArdourWidgets::FaderWidget
Gtk::Adjustment & _adjustment
 
Tweaks _tweaks
 
int _orien
 
bool _dragging
 
bool _hovering
 
float _default_value
 
GdkWindow * _grab_window
 
double _grab_loc
 
double _grab_start
 
- Protected Attributes inherited from CairoWidget
Gtkmm2ext::ActiveState _active_state
 
Gtkmm2ext::VisualState _visual_state
 
bool _need_bg
 
bool _grabbed
 
- Static Protected Attributes inherited from CairoWidget
static sigc::slot< void, Gtk::Widget * > focus_handler
 

Detailed Description

Definition at line 36 of file ardour_fader.h.

Constructor & Destructor Documentation

◆ ArdourFader()

ArdourWidgets::ArdourFader::ArdourFader ( Gtk::Adjustment &  adjustment,
int  orientation,
int  span,
int  girth 
)

◆ ~ArdourFader()

virtual ArdourWidgets::ArdourFader::~ArdourFader ( )
virtual

Member Function Documentation

◆ bg_color()

Gdk::Color ArdourWidgets::ArdourFader::bg_color ( Gtk::StateType  )
private

◆ create_patterns()

void ArdourWidgets::ArdourFader::create_patterns ( )
private

◆ display_span()

int ArdourWidgets::ArdourFader::display_span ( )
private

◆ fg_color()

Gdk::Color ArdourWidgets::ArdourFader::fg_color ( Gtk::StateType  )
private

◆ find_pattern()

static cairo_pattern_t* ArdourWidgets::ArdourFader::find_pattern ( double  afr,
double  afg,
double  afb,
double  abr,
double  abg,
double  abb,
int  w,
int  h 
)
staticprivate

◆ flush_pattern_cache()

static void ArdourWidgets::ArdourFader::flush_pattern_cache ( )
static

◆ get_parent_bg()

Gdk::Color ArdourWidgets::ArdourFader::get_parent_bg ( )
private

◆ on_motion_notify_event()

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

◆ on_size_allocate()

void ArdourWidgets::ArdourFader::on_size_allocate ( Gtk::Allocation &  alloc)
protected

◆ on_size_request()

void ArdourWidgets::ArdourFader::on_size_request ( GtkRequisition *  )
protected

◆ on_state_changed()

void ArdourWidgets::ArdourFader::on_state_changed ( Gtk::StateType  )
protected

◆ on_style_changed()

void ArdourWidgets::ArdourFader::on_style_changed ( const Glib::RefPtr< Gtk::Style > &  )
protected

◆ on_touch_update_event()

bool ArdourWidgets::ArdourFader::on_touch_update_event ( GdkEventTouch *  )
protected

◆ render()

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

◆ set_adjustment_from_event()

void ArdourWidgets::ArdourFader::set_adjustment_from_event ( GdkEventButton *  )
privatevirtual

◆ set_bg()

void ArdourWidgets::ArdourFader::set_bg ( Gtkmm2ext::Color  )
virtual

◆ set_default_value()

void ArdourWidgets::ArdourFader::set_default_value ( float  )
virtual

◆ set_fg()

void ArdourWidgets::ArdourFader::set_fg ( Gtkmm2ext::Color  )
virtual

◆ set_text()

void ArdourWidgets::ArdourFader::set_text ( const std::string &  ,
bool  centered = true,
bool  expose = true 
)

◆ unset_bg()

void ArdourWidgets::ArdourFader::unset_bg ( )
virtual

◆ unset_fg()

void ArdourWidgets::ArdourFader::unset_fg ( )
virtual

◆ update_unity_position()

void ArdourWidgets::ArdourFader::update_unity_position ( )
private

Member Data Documentation

◆ _centered_text

bool ArdourWidgets::ArdourFader::_centered_text
private

Definition at line 73 of file ardour_fader.h.

◆ _current_parent

Widget* ArdourWidgets::ArdourFader::_current_parent
private

Definition at line 76 of file ardour_fader.h.

◆ _girth

int ArdourWidgets::ArdourFader::_girth
private

Definition at line 68 of file ardour_fader.h.

◆ _layout

Glib::RefPtr<Pango::Layout> ArdourWidgets::ArdourFader::_layout
private

Definition at line 63 of file ardour_fader.h.

◆ _min_girth

int ArdourWidgets::ArdourFader::_min_girth
private

Definition at line 69 of file ardour_fader.h.

◆ _min_span

int ArdourWidgets::ArdourFader::_min_span
private

Definition at line 69 of file ardour_fader.h.

◆ _parent_style_change

sigc::connection ArdourWidgets::ArdourFader::_parent_style_change
private

Definition at line 75 of file ardour_fader.h.

◆ _pattern

cairo_pattern_t* ArdourWidgets::ArdourFader::_pattern
private

Definition at line 70 of file ardour_fader.h.

◆ _patterns

std::list<FaderImage*> ArdourWidgets::ArdourFader::_patterns
staticprivate

Definition at line 132 of file ardour_fader.h.

◆ _span

int ArdourWidgets::ArdourFader::_span
private

Definition at line 68 of file ardour_fader.h.

◆ _text

std::string ArdourWidgets::ArdourFader::_text
private

Definition at line 64 of file ardour_fader.h.

◆ _text_height

int ArdourWidgets::ArdourFader::_text_height
private

Definition at line 66 of file ardour_fader.h.

◆ _text_width

int ArdourWidgets::ArdourFader::_text_width
private

Definition at line 65 of file ardour_fader.h.

◆ _unity_loc

int ArdourWidgets::ArdourFader::_unity_loc
private

Definition at line 72 of file ardour_fader.h.

◆ explicit_bg

Gtkmm2ext::Color ArdourWidgets::ArdourFader::explicit_bg
private

Definition at line 78 of file ardour_fader.h.

◆ explicit_fg

Gtkmm2ext::Color ArdourWidgets::ArdourFader::explicit_fg
private

Definition at line 80 of file ardour_fader.h.

◆ have_explicit_bg

bool ArdourWidgets::ArdourFader::have_explicit_bg
private

Definition at line 79 of file ardour_fader.h.

◆ have_explicit_fg

bool ArdourWidgets::ArdourFader::have_explicit_fg
private

Definition at line 81 of file ardour_fader.h.

◆ outline_color

uint32_t ArdourWidgets::ArdourFader::outline_color
private

Definition at line 83 of file ardour_fader.h.


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