ardour
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
CairoWidget Class Referenceabstract

#include <cairo_widget.h>

Inheritance diagram for CairoWidget:
ArdourButton ArdourKnob AudioClock ButtonJoiner EditorSummary GroupTabs Gtkmm2ext::FastMeter Gtkmm2ext::PixFader LED ShuttleControl

Public Member Functions

 CairoWidget ()
 
virtual ~CairoWidget ()
 
void set_dirty ()
 
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 ()
 
void set_draw_background (bool yn)
 
virtual void render (cairo_t *, cairo_rectangle_t *)=0
 

Static Public Member Functions

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

sigc::signal< void > StateChanged
 

Protected Member Functions

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 ()
 
virtual void on_name_changed ()
 

Protected Attributes

Gtkmm2ext::ActiveState _active_state
 
Gtkmm2ext::VisualState _visual_state
 
bool _need_bg
 
bool _grabbed
 

Static Protected Attributes

static bool _flat_buttons = false
 
static bool _widget_prelight = true
 
static sigc::slot< void > focus_handler
 

Private Attributes

Cairo::RefPtr< Cairo::Surface > image_surface
 
Glib::SignalProxyProperty _name_proxy
 
sigc::connection _parent_style_change
 
Widget * _current_parent
 

Detailed Description

A parent class for widgets that are rendered using Cairo.

Definition at line 32 of file cairo_widget.h.

Constructor & Destructor Documentation

CairoWidget::CairoWidget ( )

Definition at line 45 of file cairo_widget.cc.

CairoWidget::~CairoWidget ( )
virtual

Definition at line 56 of file cairo_widget.cc.

Member Function Documentation

Gtkmm2ext::ActiveState CairoWidget::active_state ( ) const
inline

Definition at line 40 of file cairo_widget.h.

static bool CairoWidget::flat_buttons ( )
inlinestatic

Definition at line 74 of file cairo_widget.h.

bool CairoWidget::get_active ( )
inline

Definition at line 57 of file cairo_widget.h.

Gdk::Color CairoWidget::get_parent_bg ( )
protected

Definition at line 166 of file cairo_widget.cc.

bool CairoWidget::on_button_press_event ( GdkEventButton *  )
protected

Definition at line 62 of file cairo_widget.cc.

bool CairoWidget::on_expose_event ( GdkEventExpose *  ev)
protectedvirtual

Render the widget to the given Cairo context

Definition at line 69 of file cairo_widget.cc.

virtual void CairoWidget::on_name_changed ( )
inlineprotectedvirtual

Reimplemented in ArdourButton, and ArdourKnob.

Definition at line 111 of file cairo_widget.h.

void CairoWidget::on_size_allocate ( Gtk::Allocation &  alloc)
protected

Handle a size allocation.

Parameters
allocGTK allocation.

Definition at line 148 of file cairo_widget.cc.

void CairoWidget::on_state_changed ( Gtk::StateType  )
protected

Definition at line 243 of file cairo_widget.cc.

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

Definition at line 237 of file cairo_widget.cc.

void CairoWidget::provide_background_for_cairo_widget ( Gtk::Widget &  w,
const Gdk::Color &  bg 
)
static

Definition at line 265 of file cairo_widget.cc.

virtual void CairoWidget::render ( cairo_t *  ,
cairo_rectangle_t *   
)
pure virtual
void CairoWidget::set_active ( bool  yn)

Definition at line 223 of file cairo_widget.cc.

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

Reimplemented in ArdourButton, ArdourKnob, AudioClock, and ButtonJoiner.

Definition at line 205 of file cairo_widget.cc.

void CairoWidget::set_dirty ( )

Marks the widget as dirty, so that render () will be called on the next GTK expose event.

Definition at line 138 of file cairo_widget.cc.

void CairoWidget::set_draw_background ( bool  yn)

Definition at line 259 of file cairo_widget.cc.

void CairoWidget::set_flat_buttons ( bool  yn)
static

Definition at line 280 of file cairo_widget.cc.

void CairoWidget::set_focus_handler ( sigc::slot< void >  s)
static

Definition at line 292 of file cairo_widget.cc.

void CairoWidget::set_source_rgb_a ( cairo_t *  cr,
Gdk::Color  col,
float  a = 1.0 
)
static

Definition at line 36 of file cairo_widget.cc.

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

Reimplemented in ArdourButton, and ArdourKnob.

Definition at line 214 of file cairo_widget.cc.

void CairoWidget::set_widget_prelight ( bool  yn)
static

Definition at line 286 of file cairo_widget.cc.

void CairoWidget::unset_active_state ( )
inline

Definition at line 50 of file cairo_widget.h.

void CairoWidget::unset_visual_state ( )
inline

Definition at line 51 of file cairo_widget.h.

Gtkmm2ext::VisualState CairoWidget::visual_state ( ) const
inline

Definition at line 41 of file cairo_widget.h.

static bool CairoWidget::widget_prelight ( )
inlinestatic

Definition at line 77 of file cairo_widget.h.

Member Data Documentation

Gtkmm2ext::ActiveState CairoWidget::_active_state
protected

Definition at line 111 of file cairo_widget.h.

Widget* CairoWidget::_current_parent
private

Definition at line 127 of file cairo_widget.h.

bool CairoWidget::_flat_buttons = false
staticprotected

Definition at line 117 of file cairo_widget.h.

bool CairoWidget::_grabbed
protected

Definition at line 119 of file cairo_widget.h.

Glib::SignalProxyProperty CairoWidget::_name_proxy
private

Definition at line 125 of file cairo_widget.h.

bool CairoWidget::_need_bg
protected

Definition at line 115 of file cairo_widget.h.

sigc::connection CairoWidget::_parent_style_change
private

Definition at line 126 of file cairo_widget.h.

Gtkmm2ext::VisualState CairoWidget::_visual_state
protected

Definition at line 114 of file cairo_widget.h.

bool CairoWidget::_widget_prelight = true
staticprotected

Definition at line 118 of file cairo_widget.h.

sigc::slot< void > CairoWidget::focus_handler
staticprotected

Definition at line 121 of file cairo_widget.h.

Cairo::RefPtr<Cairo::Surface> CairoWidget::image_surface
private

Definition at line 124 of file cairo_widget.h.

sigc::signal<void> CairoWidget::StateChanged

Definition at line 67 of file cairo_widget.h.


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