![]() |
![]() |
![]() |
Grits Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define GRITS_SKIP_LOD #define GRITS_SKIP_HORIZON #define GRITS_SKIP_CENTER #define GRITS_SKIP_STATE GritsState; struct GritsObject; struct GritsObjectClass; void grits_object_draw (GritsObject *object
,GritsOpenGL *opengl
); void grits_object_hide (GritsObject *object
,gboolean hidden
); void grits_object_event (GritsObject *object
,GdkEvent *event
); void grits_object_queue_draw (GritsObject *object
); #define grits_object_center (object)
GObject +----GritsObject +----GritsCallback +----GritsMarker +----GritsPoly +----GritsTile +----GritsVolume
"button-press" :Run Last
"button-release" :Run Last
"clicked" :Run Last
"enter" :Run Last
"key-press" :Run Last
"key-release" :Run Last
"leave" :Run Last
"motion" :Run Last
Objects in grits are things which can be added to the viewer and will be displayed to the user. Each object has information such as it's location and level of detail which are used by the viewer to determine which objects should be drawn.
Each GritsObject is also a GObject, but not every GObject in grits is a GritsObject. The "Object" part of the name is just coincidence.
struct GritsObjectClass { GObjectClass parent_class; /* Move some of these to GObject? */ void (*draw) (GritsObject *object, GritsOpenGL *opengl); void (*pick) (GritsObject *object, GritsOpenGL *opengl); void (*hide) (GritsObject *object, gboolean hidden); };
void grits_object_draw (GritsObject *object
,GritsOpenGL *opengl
);
Perform any OpenGL commands necessasairy to draw the object.
The GL_PROJECTION and GL_MODELVIEW matricies and GL_ALL_ATTRIB_BITS will be restored to the default state after the call to draw.
|
the object |
|
the viewer the object is being displayed in |
void grits_object_queue_draw (GritsObject *object
);
Cause the widget to be redrawn on the screen at some later point
|
The GritsObject that needs drawing |
#define grits_object_center(object)
Get the GritsPoint representing the center of an object
|
The GritsObject to get the center of |
Returns : |
the center point |
"button-press"
signalvoid user_function (GritsObject *gritsobject,
gpointer arg1,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"button-release"
signalvoid user_function (GritsObject *gritsobject,
gpointer arg1,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"clicked"
signalvoid user_function (GritsObject *gritsobject,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"enter"
signalvoid user_function (GritsObject *object,
gpointer user_data) : Run Last
The ::enter signal is emitted when the pointer moves over the object
|
the object. |
|
user data set when the signal handler was connected. |
"key-press"
signalvoid user_function (GritsObject *gritsobject,
gpointer arg1,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"key-release"
signalvoid user_function (GritsObject *gritsobject,
gpointer arg1,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"leave"
signalvoid user_function (GritsObject *gritsobject,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"motion"
signalvoid user_function (GritsObject *gritsobject,
gpointer arg1,
gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |