Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TimelineHeaderWidget Class Reference

#include "gui/widget/timeline/timeline-header-widget.hpp"

Description

TimelineHeaderWidget is the base implementation of all header widgets and acts as a containers for the header controls.

Definition at line 45 of file timeline-header-widget.hpp.

Public Member Functions

 TimelineHeaderWidget (timeline::Track &timeline_track)
 
void set_child_widget (Widget &child)
 

Private Member Functions

GType child_type_vfunc () const
 An implementation of the a container function that specifies the types of child widget that this widget will accept. More...
 
void forall_vfunc (gboolean include_internals, GtkCallback callback, gpointer callback_data)
 Applies a given function to all the widgets in the container. More...
 
void on_add (Gtk::Widget *child)
 A notification of when a widget is added to this container. More...
 
bool on_button_press_event (GdkEventButton *event)
 An event handler for mouse button press events. More...
 
bool on_button_release_event (GdkEventButton *event)
 An event handler for mouse button release events. More...
 
bool on_expose_event (GdkEventExpose *event)
 An event handler for when the window must be redrawn. More...
 
bool on_motion_notify_event (GdkEventMotion *event)
 An event handler for mouse movement events. More...
 
void on_realize ()
 An event handler for the window realized signal. More...
 
void on_remove (Gtk::Widget *child)
 A notification of when a widget is removed to this container. More...
 
void on_size_allocate (Gtk::Allocation &allocation)
 An event handler that is called to notify this widget to allocate a given area for itself. More...
 
void on_size_request (Gtk::Requisition *requisition)
 An event handler that is called to offer an allocation to this widget. More...
 
void on_unrealize ()
 An event handler for the window unrealized signal. More...
 
void read_styles ()
 Reads styles from the present stylesheet. More...
 
void register_styles () const
 Registers all the styles that this class will respond to. More...
 

Private Attributes

bool clickedExpander
 This value is true if the mouse button is depressed over the expander. More...
 
int expand_button_size
 The style value which indicates the size to draw the expand button in pixels. More...
 
Glib::RefPtr< Gdk::Window > gdkWindow
 The widget's window object. More...
 
bool hoveringExpander
 This value is true if the mouse hovering over the expander. More...
 
int margin
 The style value which indicates the amount of padding around each header pixels. More...
 
timeline::Tracktrack
 A reference to the timeline track that owns this widget. More...
 
Gtk::Widget * widget
 The widget placed inside this container. More...
 

Constructor & Destructor Documentation

TimelineHeaderWidget ( timeline::Track timeline_track)
Parameters
timeline_tracktrack that owns this header widget

Definition at line 45 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::read_styles(), and TimelineHeaderWidget::register_styles().

+ Here is the call graph for this function:

Member Function Documentation

void set_child_widget ( Widget &  child)

Definition at line 117 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::widget.

Referenced by Track::Track().

+ Here is the caller graph for this function:

void on_realize ( )
private

An event handler for the window realized signal.

Definition at line 66 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::gdkWindow.

void on_unrealize ( )
private

An event handler for the window unrealized signal.

Definition at line 106 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::gdkWindow.

void on_size_request ( Gtk::Requisition *  requisition)
private

An event handler that is called to offer an allocation to this widget.

Parameters
requisitionThe area offered for this widget.

Definition at line 125 of file timeline-header-widget.cpp.

References ENSURE(), and TimelineHeaderWidget::widget.

+ Here is the call graph for this function:

void on_size_allocate ( Gtk::Allocation &  allocation)
private

An event handler that is called to notify this widget to allocate a given area for itself.

Parameters
allocationThe area to allocate for this widget.

Definition at line 143 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::expand_button_size, TimelineHeaderWidget::gdkWindow, TimelineHeaderWidget::margin, lib::meta::max(), and TimelineHeaderWidget::widget.

+ Here is the call graph for this function:

bool on_expose_event ( GdkEventExpose *  event)
private

An event handler for when the window must be redrawn.

Definition at line 168 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::clickedExpander, TimelineHeaderWidget::expand_button_size, TimelineHeaderWidget::gdkWindow, Track::get_expander_style(), Track::getModelTrack(), TimelineHeaderWidget::hoveringExpander, TimelineHeaderWidget::margin, and TimelineHeaderWidget::track.

+ Here is the call graph for this function:

bool on_button_press_event ( GdkEventButton *  event)
private

An event handler for mouse button press events.

Parameters
eventThe GDK event containing details of the event.

Definition at line 209 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::clickedExpander, and TimelineHeaderWidget::hoveringExpander.

bool on_button_release_event ( GdkEventButton *  event)
private

An event handler for mouse button release events.

Parameters
eventThe GDK event containing details of the event.

Definition at line 217 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::clickedExpander, Track::Collapse, Track::Expand, Track::expand_collapse(), Track::get_expanded(), TimelineLayoutHelper::is_dragging_track(), TimelineWidget::layoutHelper, Track::timelineWidget, TimelineHeaderWidget::track, and TimelineLayoutHelper::update_layout().

+ Here is the call graph for this function:

bool on_motion_notify_event ( GdkEventMotion *  event)
private

An event handler for mouse movement events.

Parameters
eventThe GDK event containing details of the event.

Definition at line 237 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::expand_button_size, TimelineHeaderWidget::hoveringExpander, TimelineHeaderWidget::margin, and gui::draw::pt_in_rect().

+ Here is the call graph for this function:

void forall_vfunc ( gboolean  include_internals,
GtkCallback  callback,
gpointer  callback_data 
)
private

Applies a given function to all the widgets in the container.

Definition at line 259 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::widget.

void on_add ( Gtk::Widget *  child)
private

A notification of when a widget is added to this container.

Definition at line 269 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::widget.

void on_remove ( Gtk::Widget *  child)
private

A notification of when a widget is removed to this container.

Definition at line 281 of file timeline-header-widget.cpp.

References NULL, and TimelineHeaderWidget::widget.

GType child_type_vfunc ( ) const
private

An implementation of the a container function that specifies the types of child widget that this widget will accept.

Definition at line 301 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::widget.

void register_styles ( ) const
private

Registers all the styles that this class will respond to.

Definition at line 316 of file timeline-header-widget.cpp.

Referenced by TimelineHeaderWidget::TimelineHeaderWidget().

+ Here is the caller graph for this function:

void read_styles ( )
private

Reads styles from the present stylesheet.

Definition at line 339 of file timeline-header-widget.cpp.

References TimelineHeaderWidget::expand_button_size, and TimelineHeaderWidget::margin.

Referenced by TimelineHeaderWidget::TimelineHeaderWidget().

+ Here is the caller graph for this function:

Member Data Documentation

timeline::Track& track
private

A reference to the timeline track that owns this widget.

Definition at line 141 of file timeline-header-widget.hpp.

Referenced by TimelineHeaderWidget::on_button_release_event(), and TimelineHeaderWidget::on_expose_event().

bool hoveringExpander
private

This value is true if the mouse hovering over the expander.

Remarks
This value is updated by on_motion_notify_event

Definition at line 153 of file timeline-header-widget.hpp.

Referenced by TimelineHeaderWidget::on_button_press_event(), TimelineHeaderWidget::on_expose_event(), and TimelineHeaderWidget::on_motion_notify_event().

bool clickedExpander
private

This value is true if the mouse button is depressed over the expander.

Remarks
This value is updated both by on_button_press_event and on_button_release_event

Definition at line 161 of file timeline-header-widget.hpp.

Referenced by TimelineHeaderWidget::on_button_press_event(), TimelineHeaderWidget::on_button_release_event(), and TimelineHeaderWidget::on_expose_event().

Glib::RefPtr<Gdk::Window> gdkWindow
private
int margin
private

The style value which indicates the amount of padding around each header pixels.

Definition at line 174 of file timeline-header-widget.hpp.

Referenced by TimelineHeaderWidget::on_expose_event(), TimelineHeaderWidget::on_motion_notify_event(), TimelineHeaderWidget::on_size_allocate(), and TimelineHeaderWidget::read_styles().

int expand_button_size
private

The style value which indicates the size to draw the expand button in pixels.

Definition at line 180 of file timeline-header-widget.hpp.

Referenced by TimelineHeaderWidget::on_expose_event(), TimelineHeaderWidget::on_motion_notify_event(), TimelineHeaderWidget::on_size_allocate(), and TimelineHeaderWidget::read_styles().

+ Inheritance diagram for TimelineHeaderWidget:
+ Collaboration diagram for TimelineHeaderWidget:

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