DA Class Reference

The drawing area used to draw vectors. More...

#include <da.h>

List of all members.

Public Member Functions

 DA (NTab &nt, GVectors::VectorStore &vs)
virtual ~DA ()
void set_line_width (double lw)
double get_line_width () const
void set_scale (double s)
void set_rotation (GVectors::Rotation &r)
double get_scale () const
GVectors::Rotation get_rotation () const
void check_dimension ()
 Gets the minimum and maximum x and y values used to project the vectors on a 2D plane using the vector store function.

Protected Member Functions

bool on_expose_event (GdkEventExpose *event)
 The expose event.
bool on_button_press_event (GdkEventButton *be)
 button presse event.
bool on_button_release_event (GdkEventButton *be)
 button release event.
bool on_motion_notify_event (GdkEventMotion *em)
 Notifications about mouse motion.
void prepare_vectors ()
 Prepares the vectors for drawing.
void prepare_for_drawing ()
 Prepares the object for drawing.

Private Attributes

Glib::RefPtr< Gdk::Window > window
 The window to drawin in.
GVectors::Coordinates common_origin
 The origin used for all top level vectors.
Gtk::Allocation allocation
 Allocation used to get some information about the drawing area.
double height
 The height of the drawing area.
double width
 The width of the drawing area.
double line_width
 The line width of the vectors.
GVectors::VectorStore & vstore
 Reference to the vector store associated with the NTab class.
double scale
 The current scale used.
GVectors::Rotation rotation
 A rotation.
bool left_mouse_button_pressed
bool use_mouse_coords_1
 Indicates which coordinates to fill next.
GVectors::Coordinates mouse_coords_1
 First set of coordinates used to calculate the mouse motion.
GVectors::Coordinates mouse_coords_2
 Second set of coordinates used to calculate the mouse motion.
NTabnt
 Reference to the NTab object holding this DA.


Detailed Description

The drawing area used to draw vectors.


Constructor & Destructor Documentation

DA::DA ( NTab n,
GVectors::VectorStore &  vs 
)

Parameters:
n The reference to the parent NTab object.
vs The reference to the vector store associated with the parent NTab object.

DA::~DA (  )  [virtual]


Member Function Documentation

bool DA::on_expose_event ( GdkEventExpose *  event  )  [protected]

The expose event.

Used to draw the vectors.

bool DA::on_button_press_event ( GdkEventButton *  be  )  [protected]

button presse event.

Used for the rotation of vectors using the mouse.

bool DA::on_button_release_event ( GdkEventButton *  be  )  [protected]

button release event.

Used for the rotation of vectors using the mouse.

bool DA::on_motion_notify_event ( GdkEventMotion *  em  )  [protected]

Notifications about mouse motion.

Used to rotate the vectors using the mouse.

void DA::prepare_vectors (  )  [protected]

Prepares the vectors for drawing.

void DA::prepare_for_drawing (  )  [protected]

Prepares the object for drawing.

void DA::set_line_width ( double  lw  ) 

double DA::get_line_width (  )  const

void DA::set_scale ( double  s  ) 

void DA::set_rotation ( GVectors::Rotation &  r  ) 

double DA::get_scale (  )  const

GVectors::Rotation DA::get_rotation (  )  const

void DA::check_dimension (  ) 

Gets the minimum and maximum x and y values used to project the vectors on a 2D plane using the vector store function.

Based on the difference of the min/max retrieved, we decide whether or not we have to enlarge the drawing area.


Member Data Documentation

Glib::RefPtr<Gdk::Window> DA::window [private]

The window to drawin in.

GVectors::Coordinates DA::common_origin [private]

The origin used for all top level vectors.

Gtk::Allocation DA::allocation [private]

Allocation used to get some information about the drawing area.

double DA::height [private]

The height of the drawing area.

double DA::width [private]

The width of the drawing area.

double DA::line_width [private]

The line width of the vectors.

Warning:
Not used so far.

GVectors::VectorStore& DA::vstore [private]

Reference to the vector store associated with the NTab class.

double DA::scale [private]

The current scale used.

GVectors::Rotation DA::rotation [private]

A rotation.

bool DA::left_mouse_button_pressed [private]

bool DA::use_mouse_coords_1 [private]

Indicates which coordinates to fill next.

If set to true, the first set of coordinates are filled, if set to false, the second set of coordinates are filled.

This is used to compute the mouse motion in order to use the mouse to rotate the vectors.

GVectors::Coordinates DA::mouse_coords_1 [private]

First set of coordinates used to calculate the mouse motion.

GVectors::Coordinates DA::mouse_coords_2 [private]

Second set of coordinates used to calculate the mouse motion.

NTab& DA::nt [private]

Reference to the NTab object holding this DA.


The documentation for this class was generated from the following files:
Generated on Tue Sep 11 01:14:32 2007 for gvectors by  doxygen 1.4.7