ardour
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ArdourKnob Class Reference

#include <ardour_knob.h>

Inheritance diagram for ArdourKnob:
CairoWidget Gtkmm2ext::Activatable

Public Types

enum  Element {
  Arc = 0x1, Bevel = 0x2, unused2 = 0x4, unused3 = 0x8,
  unused4 = 0x10, unused5 = 0x20
}
 
enum  Flags { NoFlags = 0, Detent = 0x1, ArcToZero = 0x2 }
 

Public Member Functions

 ArdourKnob (Element e=default_elements, Flags flags=NoFlags)
 
virtual ~ArdourKnob ()
 
void set_active_state (Gtkmm2ext::ActiveState)
 
void set_visual_state (Gtkmm2ext::VisualState)
 
Element elements () const
 
void set_elements (Element)
 
void add_elements (Element)
 
void set_tooltip_prefix (std::string pfx)
 
boost::shared_ptr
< PBD::Controllable
get_controllable ()
 
void set_controllable (boost::shared_ptr< PBD::Controllable > c)
 
bool on_button_press_event (GdkEventButton *)
 
bool on_button_release_event (GdkEventButton *)
 
bool on_scroll_event (GdkEventScroll *ev)
 
bool on_motion_notify_event (GdkEventMotion *ev)
 
void color_handler ()
 
- Public Member Functions inherited from CairoWidget
 CairoWidget ()
 
virtual ~CairoWidget ()
 
void set_dirty ()
 
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 ()
 
void set_draw_background (bool yn)
 
- Public Member Functions inherited from Gtkmm2ext::Activatable
virtual ~Activatable ()
 
virtual void set_related_action (Glib::RefPtr< Gtk::Action > a)
 
Glib::RefPtr< Gtk::Action > get_related_action ()
 

Static Public Attributes

static Element default_elements = ArdourKnob::Element (ArdourKnob::Arc)
 

Protected Member Functions

void render (cairo_t *, cairo_rectangle_t *)
 
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 ()
 
bool on_enter_notify_event (GdkEventCrossing *)
 
bool on_leave_notify_event (GdkEventCrossing *)
 
bool on_focus_in_event (GdkEventFocus *)
 
bool on_focus_out_event (GdkEventFocus *)
 
void controllable_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 > &)
 
bool on_button_press_event (GdkEventButton *)
 
Gdk::Color get_parent_bg ()
 

Protected Attributes

PBD::ScopedConnection watch_connection
 
- 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
 

Private Member Functions

void action_sensitivity_changed ()
 
void action_visibility_changed ()
 
void action_tooltip_changed ()
 

Private Attributes

Element _elements
 
BindingProxy binding_proxy
 
bool _hovering
 
float _grabbed_x
 
float _grabbed_y
 
float _val
 
float _normal
 
float _dead_zone_delta
 
Flags _flags
 
std::string _tooltip_prefix
 
KnobPersistentTooltip _tooltip
 

Additional Inherited Members

- Static Public Member Functions inherited from CairoWidget
static void provide_background_for_cairo_widget (Gtk::Widget &w, const Gdk::Color &bg)
 
static void set_flat_buttons (bool yn)
 
static bool flat_buttons ()
 
static void set_widget_prelight (bool yn)
 
static bool widget_prelight ()
 
static void set_source_rgb_a (cairo_t *cr, Gdk::Color, float a=1.0)
 
static void set_focus_handler (sigc::slot< void >)
 
- Public Attributes inherited from CairoWidget
sigc::signal< void > StateChanged
 
- Static Protected Attributes inherited from CairoWidget
static bool _flat_buttons = false
 
static bool _widget_prelight = true
 
static sigc::slot< void > focus_handler
 

Detailed Description

Definition at line 47 of file ardour_knob.h.

Member Enumeration Documentation

Enumerator
Arc 
Bevel 
unused2 
unused3 
unused4 
unused5 

Definition at line 51 of file ardour_knob.h.

Enumerator
NoFlags 
Detent 
ArcToZero 

Definition at line 60 of file ardour_knob.h.

Constructor & Destructor Documentation

ArdourKnob::ArdourKnob ( Element  e = default_elements,
Flags  flags = NoFlags 
)

Definition at line 58 of file ardour_knob.cc.

ArdourKnob::~ArdourKnob ( )
virtual

Definition at line 75 of file ardour_knob.cc.

Member Function Documentation

void ArdourKnob::action_sensitivity_changed ( )
private
void ArdourKnob::action_tooltip_changed ( )
private
void ArdourKnob::action_visibility_changed ( )
private
void ArdourKnob::add_elements ( Element  e)

Definition at line 559 of file ardour_knob.cc.

void ArdourKnob::color_handler ( )

Definition at line 443 of file ardour_knob.cc.

void ArdourKnob::controllable_changed ( )
protected

Definition at line 471 of file ardour_knob.cc.

Element ArdourKnob::elements ( ) const
inline

Definition at line 72 of file ardour_knob.h.

boost::shared_ptr<PBD::Controllable> ArdourKnob::get_controllable ( )
inline

Definition at line 79 of file ardour_knob.h.

bool ArdourKnob::on_button_press_event ( GdkEventButton *  ev)

Definition at line 390 of file ardour_knob.cc.

bool ArdourKnob::on_button_release_event ( GdkEventButton *  ev)

Definition at line 423 of file ardour_knob.cc.

bool ArdourKnob::on_enter_notify_event ( GdkEventCrossing *  ev)
protected

Definition at line 533 of file ardour_knob.cc.

bool ArdourKnob::on_focus_in_event ( GdkEventFocus *  ev)
protected

Definition at line 519 of file ardour_knob.cc.

bool ArdourKnob::on_focus_out_event ( GdkEventFocus *  ev)
protected

Definition at line 526 of file ardour_knob.cc.

bool ArdourKnob::on_leave_notify_event ( GdkEventCrossing *  ev)
protected

Definition at line 543 of file ardour_knob.cc.

bool ArdourKnob::on_motion_notify_event ( GdkEventMotion *  ev)

Definition at line 321 of file ardour_knob.cc.

void ArdourKnob::on_name_changed ( )
protectedvirtual

Reimplemented from CairoWidget.

Definition at line 497 of file ardour_knob.cc.

bool ArdourKnob::on_scroll_event ( GdkEventScroll *  ev)

Definition at line 292 of file ardour_knob.cc.

void ArdourKnob::on_size_allocate ( Gtk::Allocation &  )
protected

Definition at line 449 of file ardour_knob.cc.

void ArdourKnob::on_size_request ( Gtk::Requisition *  req)
protected

Definition at line 277 of file ardour_knob.cc.

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

Definition at line 491 of file ardour_knob.cc.

void ArdourKnob::render ( cairo_t *  cr,
cairo_rectangle_t *   
)
protectedvirtual

Implements CairoWidget.

Definition at line 80 of file ardour_knob.cc.

void ArdourKnob::set_active_state ( Gtkmm2ext::ActiveState  s)
virtual

Reimplemented from CairoWidget.

Definition at line 504 of file ardour_knob.cc.

void ArdourKnob::set_controllable ( boost::shared_ptr< PBD::Controllable c)

Definition at line 455 of file ardour_knob.cc.

void ArdourKnob::set_elements ( Element  e)

Definition at line 553 of file ardour_knob.cc.

void ArdourKnob::set_tooltip_prefix ( std::string  pfx)
inline

Definition at line 77 of file ardour_knob.h.

void ArdourKnob::set_visual_state ( Gtkmm2ext::VisualState  s)
virtual

Reimplemented from CairoWidget.

Definition at line 511 of file ardour_knob.cc.

Member Data Documentation

float ArdourKnob::_dead_zone_delta
private

Definition at line 115 of file ardour_knob.h.

Element ArdourKnob::_elements
private

Definition at line 105 of file ardour_knob.h.

Flags ArdourKnob::_flags
private

Definition at line 117 of file ardour_knob.h.

float ArdourKnob::_grabbed_x
private

Definition at line 110 of file ardour_knob.h.

float ArdourKnob::_grabbed_y
private

Definition at line 111 of file ardour_knob.h.

bool ArdourKnob::_hovering
private

Definition at line 109 of file ardour_knob.h.

float ArdourKnob::_normal
private

Definition at line 114 of file ardour_knob.h.

KnobPersistentTooltip ArdourKnob::_tooltip
private

Definition at line 124 of file ardour_knob.h.

std::string ArdourKnob::_tooltip_prefix
private

Definition at line 123 of file ardour_knob.h.

float ArdourKnob::_val
private

Definition at line 113 of file ardour_knob.h.

BindingProxy ArdourKnob::binding_proxy
private

Definition at line 107 of file ardour_knob.h.

ArdourKnob::Element ArdourKnob::default_elements = ArdourKnob::Element (ArdourKnob::Arc)
static

Definition at line 75 of file ardour_knob.h.

PBD::ScopedConnection ArdourKnob::watch_connection
protected

Definition at line 101 of file ardour_knob.h.


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