GLICT DOCUMENTATION
(c) 2006-2008 Ivan Vucica

programmed by Ivan Vucica

If you use GLICT, you should make it a priority to contact us! We need to know
how many people use it, so that we know if we can do critical API changes.

Visit www.objectnetworks.net for more information on our projects.

Note, this file was not exactly updated for over a year and definitely not for 
1.1 release.

    GLICT - Graphics Library Interface Creation Toolkit
    Copyright (C) 2006-2008 Ivan Vucica

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

GLICT stands for Graphics Library Interface Creation Toolkit. It is designed as a drop-in library for simple building into existing applications, as well as easy programming of additional controls into it. Every control can contain subcontrols. We have decided to release this library under GNU Library General Public License - the LGPL. This has been done for a simple reason - to allow introduction of it into different closed-source products, while keeping it open source. We, of course, encourage you to develop more free software, according to four basic liberties as defined by Free Software Foundation.

This library provides a very simple C++ interface which uses few very simple functions to set up the interface and to manage it.

USAGE

Please read the documentation generated with Doxygen.

All the user interface controls are C++ classes derived from glictContainer class. This class contains only basic functionalities and does not render anything. It handles object management, clipping, and drawing subobjects. It is intended to serve only as a desktop class. Here are the public interfaces in this class:

	// customizable functions
        virtual void Paint();

        // the following elements are always inherited from container
        void CPaint();
        void AddObject(glictContainer* object);
        void RemoveObject(glictContainer* object);
        void SetHeight(int h);
        void SetWidth(int w);
        void SetPos(int x, int y);
        void SetPos(glictPos pos);
        void GetPos(int* x, int* y);
        void GetPos(glictPos* pos);
        void GetSize(glictSize* size);
        void SetScissor();

Paint() is used to draw the element. This is an inheritable function and is intended to be replaced by custom controls.
CPaint() is used to draw child elements. It sets up the clipping and draws each object.
AddObject() adds an object as a subobject into the control.
RemoveObject() removes an object from the control.
SetHeight() sets the height of the control.
SetWidth() sets the width of the control.
SetPos() sets the position of the control inside the parent control.
GetPos() and GetSize() respectively get the size.
SetScissor() prepares for drawing by activating appropriate clipping model. We do not recommend that this function is used and do not promise ongoing support for it.


Before using the widgets, you should set up at least a GLICT font named
"system" (case sensitive). It is the font used through GLICT widget rendering.


This library is still deep in development. We encourage capable people to join the project and assist in making this a library that's easy for implementation everywhere.

TODO

Clicking must be handled via verifying if an element has been rendered on certain pixel, not the way it's done right now. Currently we cannot do custom-shaped widgets, only rectangle widgets!
Effects of glScalef() are not detransformed in glictContainer::TransformScreenCoords()

