gcp::View Class Reference
#include <gcp/view.h>
List of all members.
Detailed Description
The GChempaint document view.
Definition at line 47 of file gcp/view.h.
Constructor & Destructor Documentation
gcp::View::View |
( |
Document * |
pDoc, |
|
|
bool |
Embedded | |
|
) |
| | |
- Parameters:
-
| pDoc | the GchemPaint document for the new view. |
| Embedded | whether the document is embedded in another application or is standalone. |
Constructs the document view.
virtual gcp::View::~View |
( |
|
) |
[virtual] |
Member Function Documentation
GtkWidget* gcp::View::GetWidget |
( |
void |
|
) |
[inline] |
- Returns:
- the canvas widget used for the view.
Definition at line 69 of file gcp/view.h.
Document* gcp::View::GetDoc |
( |
void |
|
) |
[inline] |
- Returns:
- the document associated with the view.
Definition at line 73 of file gcp/view.h.
bool gcp::View::OnEvent |
( |
GnomeCanvasItem * |
item, |
|
|
GdkEvent * |
event, |
|
|
GtkWidget * |
widget | |
|
) |
| | |
- Parameters:
-
| item | the canvas item at the positionof the event. |
| event | the GdkEvent. |
| widget | the canvas widget. |
Called by the framework when an event occured in the canvas.
- Returns:
- false if the event should be processed further, true otherwise.
void gcp::View::OnDeleteSelection |
( |
GtkWidget * |
w |
) |
|
- Parameters:
-
| w | the active document widget. |
Removes all objects in the widget.
void gcp::View::OnCopySelection |
( |
GtkWidget * |
w, |
|
|
GtkClipboard * |
clipboard | |
|
) |
| | |
- Parameters:
-
| w | the active document widget. |
| clipboard | a GtkClipboard. |
Called by the framework to copy the selection.
void gcp::View::OnPasteSelection |
( |
GtkWidget * |
w, |
|
|
GtkClipboard * |
clipboard | |
|
) |
| | |
- Parameters:
-
| w | the active document widget. |
| clipboard | a GtkClipboard. |
Called by the framework to paste clipboard contents.
void gcp::View::OnCutSelection |
( |
GtkWidget * |
w, |
|
|
GtkClipboard * |
clipboard | |
|
) |
| | |
- Parameters:
-
| w | the active document widget. |
| clipboard | a GtkClipboard. |
Called by the framework to copy and delete the selection.
xmlDocPtr gcp::View::BuildSVG |
( |
|
) |
|
- Returns:
- the xml document containig the svg output.
GdkPixbuf* gcp::View::BuildPixbuf |
( |
int |
resolution |
) |
|
- Parameters:
-
| resolution | the resolution for the new image. |
Builds a new image with the given resolution in ppi. The size is evaluated using the guessed screen resolution.
- Returns:
- the new pixbuf.
void gcp::View::EnsureSize |
( |
|
) |
|
Called by the framework to ensure that the view size is enough large to contain all objects.
void gcp::View::Zoom |
( |
double |
zoom |
) |
|
- Parameters:
-
Sets the zoom level.
void gcp::View::ShowCursor |
( |
bool |
show |
) |
|
- Parameters:
-
| show | whether to show the cursor or not. |
Shows or hides the cursor in the currently edited text item if any.
void gcp::View::UpdateTheme |
( |
|
) |
|
Called by the framework to update the default font size after a theme change.
void gcp::View::Render |
( |
cairo_t * |
cr |
) |
|
- Parameters:
-
| cr | the cairo_t to which render. |
Renders the document using cairo.
gcp::View::GetBaseLineOffset |
( |
void |
|
) |
[inline] |
- Returns:
- the vertical offset for algnment of an atomic symbol. This value is half the height of the "C" character.
Definition at line 260 of file gcp/view.h.
gcp::View::GetActiveRichText |
( |
void |
|
) |
[inline] |
- Returns:
- the currently edited text item if any, or NULL.
Definition at line 264 of file gcp/view.h.
The documentation for this class was generated from the following file: