Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ImageTransitionSwitch Class Reference

Inheritance diagram for ImageTransitionSwitch:

Inheritance graph
[legend]
Collaboration diagram for ImageTransitionSwitch:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImageTransitionSwitch ()
virtual ~ImageTransitionSwitch ()
char * GetDescription () const
void GetFrame (uint8_t *pixels, uint8_t *mesh, int width, int height, double position, double frame_delta, bool reverse)
void AttachWidgets (GtkBin *bin)
void DetachWidgets (GtkBin *bin)
double SwitchPoint ()

Private Attributes

GtkWidget * window
double point

Constructor & Destructor Documentation

ImageTransitionSwitch::ImageTransitionSwitch  )  [inline]
 

Definition at line 64 of file image_transitions.cc.

References lookup_widget(), magick_glade, Repaint(), and window.

00065     {
00066         window = glade_xml_get_widget( magick_glade, "image_transition_switch" );
00067         GtkWidget* widget = lookup_widget( window, "hscale_switch" );
00068         g_signal_connect( G_OBJECT( widget ), "value-changed", G_CALLBACK( Repaint ), 0 );
00069     }

virtual ImageTransitionSwitch::~ImageTransitionSwitch  )  [inline, virtual]
 

Definition at line 71 of file image_transitions.cc.

References window.

00072     {
00073         gtk_widget_destroy( window );
00074     }


Member Function Documentation

void ImageTransitionSwitch::AttachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from GDKImageTransition.

Definition at line 91 of file image_transitions.cc.

References window.

00092     {
00093         gtk_widget_reparent( ( GTK_BIN( window ) ) ->child, GTK_WIDGET( bin ) );
00094     }

void ImageTransitionSwitch::DetachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from GDKImageTransition.

Definition at line 96 of file image_transitions.cc.

References window.

00097     {
00098         gtk_widget_reparent( ( GTK_BIN( bin ) ) ->child, GTK_WIDGET( window ) );
00099     }

char* ImageTransitionSwitch::GetDescription  )  const [inline, virtual]
 

Implements ImageTransition.

Definition at line 76 of file image_transitions.cc.

00077     {
00078         return _( "Switch" );
00079     }

void ImageTransitionSwitch::GetFrame uint8_t *  pixels,
uint8_t *  mesh,
int  width,
int  height,
double  position,
double  frame_delta,
bool  reverse
[inline, virtual]
 

Implements ImageTransition.

Definition at line 81 of file image_transitions.cc.

References lookup_widget(), point, and window.

00082     {
00083         GtkRange * range = GTK_RANGE( lookup_widget( window, "hscale_switch" ) );
00084         GtkAdjustment *adjust = gtk_range_get_adjustment( range );
00085         point = adjust->value / 100;
00086         
00087         if ( position >= point )
00088             memcpy( pixels, mesh, width * height * 3 );
00089     }

double ImageTransitionSwitch::SwitchPoint  )  [inline]
 

Definition at line 101 of file image_transitions.cc.

References point.

00102     {
00103         return point;
00104     }


Member Data Documentation

double ImageTransitionSwitch::point [private]
 

Definition at line 61 of file image_transitions.cc.

Referenced by GetFrame(), and SwitchPoint().

GtkWidget* ImageTransitionSwitch::window [private]
 

Definition at line 60 of file image_transitions.cc.

Referenced by AttachWidgets(), DetachWidgets(), GetFrame(), ImageTransitionSwitch(), and ~ImageTransitionSwitch().


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 22:13:06 2007 for Kino by  doxygen 1.4.2