The Gnome Chemistry Utils  0.14.0
Classes | Namespaces | Macros
gccv/text.h File Reference
#include "rectangle.h"
#include "structs.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <pango/pango.h>
#include <list>
#include <string>

Go to the source code of this file.

Classes

class  gccv::Text
 Text. More...

Namespaces

namespace  gccv
 Gnome Chemistry Canvas library namespace.

Macros

#define GCCV_TEXT_PROP(type, member)

Detailed Description

Definition in file gccv/text.h.

Macro Definition Documentation

#define GCCV_TEXT_PROP (   type,
  member 
)
Value:
public: \
void Set##member (type val) { \
m_##member = val; \
SetPosition (m_x, m_y); \
} \
type Get##member (void) const {return m_##member;} \
private: \
type m_##member;

Defines a private member with appropriate get/set methods. This macro should be used when a property change imples a size and/or position change of the text item. GCCV_TEXT_PROP((Type,Foo) expands to one private member:

Type m_Foo;

and three public methods:

void SetFoo(Type val);
Type GetFoo();

Calling SetFoo(val) will set the member, reevaluate the size and position, and redraw the text item.

Definition at line 57 of file gccv/text.h.