omtk - a platform independent GUI toolkit

Documentation

 

Document

Events

OMTK_EVENT_SHOULD_CLOSE

#define OMTK_EVENT_SHOULD_CLOSE

OMTK_EVENT_DID_CLOSE

#define OMTK_EVENT_DID_CLOSE

Functions

omtk_document_single()

OmtkWidget *omtk_document_single(char *name);

Returns the document in of a single document application. You must not use omtk_document_create() if you use omtk_document_single(). name is the title of the document and must not be NULL. You can call this function only once.

See examples/templates/sdi/sdi.c for an example.

omtk_document_create()

OmtkWidget *omtk_document_create(char *name);

Returns a new document with the specified name. name must not be NULL.

See examples/templates/mdi/mdi.c for an example.

omtk_document_close()

void omtk_document_close(OmtkWidget *document);

Closes a document.

See examples/templates/mdi/mdi.c for an example.

omtk_document_list_get()

OmtkList *omtk_document_list_get(void);

Returns an OmtkList with all documents. It returns an empty list or NULL, if no document is open.

omtk_document_name_get()

char *omtk_document_name_get(OmtkWidget *document);

Returns the title of the document.

omtk_document_active_get()

OmtkWidget *omtk_document_active_get(void);

Returns the active document or NULL if no document is active. Don't use this function in callbacks to get the document of a widget. Use omtk_document_of_widget() instead.

omtk_document_active_set()

void omtk_document_active_set(OmtkWidget *document);

Brings document to front.

omtk_document_contents_get()

OmtkWidget *omtk_document_contents_get(OmtkWidget *document);

Returns the contents of document or NULL, if the document is empty.

omtk_document_contents_set()

void omtk_document_contents_set(OmtkWidget *document, OmtkWidget *contents);

Sets the contents of document to contents.

omtk_document_border_set()

void omtk_document_border_set(OmtkWidget *document, int size);

Sets the border of document to size.

omtk_document_border_get()

int omtk_document_border_get(OmtkWidget *document);

Returns the border size of document.

omtk_document_of_widget()

omtk_document_of_widget(OmtkWidget *widget);

Returns the document of a widget.

Added in omtk 0.1.2.

omtk_document_default_widget_set()

void omtk_document_default_widget_set(OmtkWidget *document, OmtkWidget *widget);

Sets the default widget of a document. The default widget is activated when you press enter.

See examples/wordtrain/wordtrain.c for an example.

omtk_document_free()

void omtk_document_free(OmtkWidget *widget);

Frees the document. Do not use this in your application, use omtk_document_close() instead.

omtk_document_freeall()

void omtk_document_freeall(void);

Frees all documents. Do not use this in your application.



Zurück zu www.eggdrop.ch | Back to www.eggdrop.ch

Last update: 20.02.04

Copyright (C) 2004, 2005 by Thomas "tom" Steinacher <tom at eggdrop.ch>

SourceForge.net Logo Valid HTML 4.0!