WHATS NEW? MAILING LIST DOCUMENTATION SCREENS PHOTOS DOWNLOAD

OpenGUI home page

New release OpenGUI 4.9.0 - experimental !!!
(1. march 2004)

* all classes are with prexix FG* on now (DrawBuffer -> FGDrawBuffer).
* added classes FGPoint, FGPointArray (inspired by QT)
* enhnanced existing class FGRect
* FGDrawBuffer::save_state(), restore_state().
all polygon functions are using FGPointArray instead (int, int [][2]).
but there are some macros to hide this behaviour.
* all FGDrawBuffer by parameters overloaded methods like box(x,y,w.h,ink)
are now all-in-one.
* polygon functions uses FGPointArray from now
* class GuiEvent was renamed to FGEvent
* some ´by parameters´ overloaded methods was removed (class FGWindow)
* many other small changes
* update doxygen config
* updated win32.cpp a linkeyb.cpp for namespace fgl
* char* -> const char*
* int paper=-1 -> unsigned paper=UNDEFINED_COLOR
* new FGInternalState (compound some global library variables)
* _GTRANSP was renamed to _GCOLORKEY
* added _GTRASPARENT for alpha blending
* default color_key was changed from 0xffffffff to 0x12345678


New release OpenGUI 4.3.7
(18. feb 2004)

* added class FGDialog
* added: bool FileDialog::TestForOverwrite(void)
* fixed ShowModal()
* fixed CScheme & EditBox visual
* changed size of text buffer for editbox (from 128 to 252 chars)
* added '-pipe' gcc option to the makefile
* changed name of some ColorShceme members
changed/fixed CScheme members
edit_back -> edit_background_active
edit_bord1 -> edit_border
edit fore -> edit_foreground
edit_disable -> edit_disable_fore
edit_bord2 -> edit_background


New release OpenGUI 4.3.6
(10. feb 2004)

* Window::WindowDrawPolygon(int n, int p[][2], int col) fixed passing color parameter
* fixed Panel::draw() - no more drawing empty strings
* fixed opened EditBox on TabPage switching
* added backtrace list on unhandled signal occuring
* fixed crash on non-exist file in CfgStore constructor
* added bool CfgStore::IsValidStream(void);


New release OpenGUI 4.3.5
(22. jan 2004)

* Window::WindowDrawPolygon(int n, int p[][2], int col) fixed passing color parameter
* fixed Panel::draw() - no more drawing empty strings
* fixed opened EditBox on TabPage switching
* added backtrace list on unhandled signal occuring
* fixed crash on non-exist file in CfgStore constructor
* added bool CfgStore::IsValidStream(void);

Updated BOOKs directory
(20. jan 2004)



New release OpenGUI 4.3.4
(25. nov 2003)

* global functions test_mmx(), set_mmx() and reset_mmx() are members of class App from now
* fonctions for access IO ports (outpb() & family) works OK with Intel C++ now
* added static methods in the class App for asynchronous testing of modifier keys pressing
static bool App::IsShift(void);
static bool App::IsCtrl(void);
static bool App::IsAlt(void);
* added FileDialog::BuildFullPathname(char* buffer);
* added FileDialog::BuildRelativePathname(char* buffer);
* fixed bug when FileDialog changes working directory in some cases
* fixed bug with RadioGroups and not setting its int variable
* added const char* GuiEvent::GetKeySymbolName(unsigned int code)


New release OpenGUI 4.3.3
(12. nov 2003)

* reimplemented class FileDialog
* class CfgStore is now optimized for size
* some compiling issues with Intel C++ and Borland C++
* fixed install script for solaris



New release OpenGUI 4.3.2
(8. nov 2003)

* finalized migration to fgl namespace
* fixed examples
* minor changes to classes RadioGroupH and RadioGroupV
* some code cleanup


New release OpenGUI 4.3.1
(3. nov 2003)

* migration to __fastcall declspec (C++ ABI to last OpenGUI is broken - recompile all projects)
* documentation improvemets
* Added class RadioGroupV - see example 'radiogroup'
* Added class RadioGroupH - see example 'radiogroup'
* added class FGText - dynamic text strings
* added void BaseGUI::SetUserData(void*)
* added void* BaseGUI::GetUserData(void)


New release OpenGUI 4.3.0
(28. oct 2003)

* updated RAD utility for better compatibility of generated code
* projects update
* class Config is now standalone in files cfg.[cpp h]
* added new data storage classes - cfgstore.cpp
* added the biggest feature - 'pane' - see example 'pane'
* added Config::Sort() methods to store config file as sorted
* Controls now accept SetFont() call
* Window::WindowPanel() is deprecated - use Window::AddPanel() instead
from now is panel a regular Control object - i.e. you don't need repaint
one explicitly
* using VESA VGA framebuffer now emit error properly - use native one
* fixed bug with XWindow keyboard and death keys
* some changes to makefiles - by example you can type 'make alls' for building
static libraries only.
* fixed listbox::SetColors() - bad argument order
* added T& listbox::item(int) for compatibility with older versions of OpenGUI


New release OpenGUI 4.2.9
(6. oct 2003)

* fixed crash on WindowIconize() call
* added support for Intel C++ 7.0 (edit linux.mak file, replace the string 'gcc' with 'icc' )
* revisited Solaris 2.8 compiling - works OK
* namespace support was introduced - edit base.h file, line 33 to support
this feature - namespace code is 'fgl'
* class FGTimer has new parent: class FGConnector, for better system interaction
* added CBuilderX project files (yes, it realy exists and compile OpenGUI library!)

COMING SOON - FGLayout (for autoformat of Controls)

New release OpenGUI 4.2.2
(22 sep 2003)

* the mouse wheel is now supported on X11 and WIN32 platforms
now some visual Controls are sensitive to the wheel, e.g. EditBox(), FGUpDown() or Slider()
* change compile options '-O3' to '-O2' for LINUX because of gcc 3.3 miscompiling
* fixed class FGTabPage copy constructor, Window::AddTabPage() now works properly
* added method: int Config::ReadBool(char* name, bool& value);
* added method: void Config::WriteBool(char* name, bool value);
* added new event type: MOUSEWHEELEVENT
GuiEvent::GetButtons() call for this event returns -1 or 1 for apropriate directions
* added new event type: CLICKMIDDLEEVENT
* added virtual void Window::OnMiddleButton(int x, int y)
* added virtual void Window::ControlOnWheel(int x, int y, int delta)
* added virtual void Control::WheelSpin(int delta)
* added CheckButton *Window::AddCheckButton(int xs, int ys, char *nm, int key, bool * variable, ControlCall f, int flag)
* added CheckButton *MenuWindow::AddCheckButton(char *nm, int key, bool * variable, ControlCall f, int flag)

New release OpenGUI 4.2.1
(1 sep 2003)

* fixed ClipLine() code freeze
* added TIFF image file support (via libtiff) - configure via 'config.mak' file
* added middle mouse button support via CLICKMIDDLEEVENT, DBLCLICKMIDDLEEVENT
* added Bitmap::rotate(ENUM_ROTATE_DIRECTION) method
* added copy constructor to class DrawBuffer
* added copy constructor to class Bitmap
* you can get the screenshot under Windows by pressing F12 now


New release OpenGUI 4.2.0 - Visual C++ support
(10 july 2003)

* M$ Visual C++ 6 support added
* MenuWindow constructors no more requires 'name' parameter
* completely new Win32 & DirectX code
* added support for windowed mode for the Windows platform - good for debug
you can enable by command line parameter '-win'
NOTE: you must have use the same color depth for OpenGUI app and your
windows desktop - i.e. compile with BPP16 for 16bit colors, BPP32 for true
colors etc.
* fixed - FileDialog closes when you click to a file as before
* MenuWindow automation positioning works as before :-)


New release OpenGUI 4.1.2 - TTF support for all!
(22 june 2003)

* added widget/class FontDialog to font choose by user - see the new example 'fontsel'
* added function:
int FGFontManager::register_font_ttf(char *filename, int points, int count, int offset, char *desc);
it registers truetype font (if TTF support is enabled) with specified size as
standard system fonts
* Kylix3 port will work properly with the tool VALGRIND
(superb memory leak/corrupt detector)
* added 'char *fontname' parameter to the all font prepare functions
* fixed some minor bugs related to font management
* fixed Solaris 8 compiling - it runs OK
* added function: char * FGFontManeger::GetFontName(int font_id);
* the max number of system fonts is increased to 256



New release OpenGUI 4.1.1!
(15 june 2003)

* fixed clipping with DrawBuffer::putpixel()
* added RTTI compiling switch to Kylix3 and BCB6 projects for better ABI compatibility
* added APP_ENABLEEFECTS for application constructor (enables some visual efects
on now only screen clear at exit)
* added two new virtual callbacks to class App:
virtual bool OnIdle(void);
virtual void OnTimer(int secs);
* fixed crash on the delete of class TextEditor (corrupted vtable)


New release OpenGUI 4.1.0!
(09 june 2003)

* major doc update - if you have installed DOXYGEN try type: 'make doc'
and see at the directory ../doc, else download one from website.
* many protected members and methods were moved to private part of class
so if you lost compatibility, try send me email with details to improve.
* removed some absolete methods
* get_key() is now App::get_key();
* FileDialog class callback routine has new prototype:
old: void (*callback)(char *);
new: void (*callback)(char *, FileDialog *);
* Palette has been rename to FGPalette
* added Window::WindowClose() for regular window destruction



New OpenGUI mailing list !!!
(12. may 2003)

Subscribe here!


Doxygen doc version 0.6
(09 june 2003)
HTML docs



class App

{
        int mouseflag;
        int mx, my, mb, oldx, oldy, oldb, drag, action;
        int XX, YY;

        int mousefirst, resize, tmp_event,
            resizex, resizey,
            dragx, dragy,
            clickx,    clicky,    clickw,    clickh,
            vyrez;

        Control *idcb;
        Control *idc2;
        Window *drag_okno;
        static int repeat_status, repeat_delay1, repeat_delay2;
        GuiEvent *hold_event;

        int  RemoveMousePointer(void);
        void ShowMousePointer(void);
        void blue_rect(int x, int y, int w, int h);
        void blue_rect2(int x, int y, int w, int h);
    protected:
        void AutoRepeatStart(Control *);
        void AutoRepeatDo(void);
        void DoubleClick(int& event);

        static    GuiEvent queque[MAX_EVENT_QUEQUE];
        static    void (*DelayProc)(void);
        static    int    quequeIndex;
        static    void (*OnEverySecond)(int);
        static  Window *Root;
        static    MainHwnd appHandler;
        static  unsigned long ticks;
        static  int ctrl_break;
        static  int startXdrag;
        static  int startYdrag;
        static  int endXdrag;
        static  int endYdrag;
        static void (*DragShape)(int , int ,int    , int );
        static FGPixel __p4[8];
        static Pattern __patt;
    public:
        static  FGMouseCursor *__fg_cursor;
        static  int     fulldrag;
        static    int        flags;
        static    int        video;
        static    int        Argc;
        static    int        background;
        static    char    **Argv;
        static    char    * name;
        static    char    *homedir;
        static  char    currdir[128];
        static    int     ttf_support;

        static    void SetDelayProc(void (*fnc)(void))
        {
            DelayProc =    fnc;
        }
        static    void CallDelayProc(void)
        {
            if (DelayProc) DelayProc();
            else delay(10);
        }

        void UpdateMousePointer(void);
        void SaveScreen(void);

        static void DisableCtrlBreak(void)
        {
            ctrl_break ^= 1;
        }
        static void SetWindowMoveStyle(int a)
        {
            fulldrag = a;
        }
        App(int, int &,    char **    &, int b, int f=APP_ENABLEALTX);
        virtual ~App();

        static    void SendToApp(GuiEvent    *x);
        void    Run(MainHwnd hwnd=0);
        void    FGYield(void);
        static    void AppDone(void)
        {
            GuiEvent e(QUITEVENT);
            SendToApp(&e);
        }
        static    void Timer(void);
        // NOTE! resolution is cca. 20ms
        static void    SetTimerProc(void ((*p)(int)), int t=1000)
        {
            OnEverySecond =    p;
            ticks = t;
        }
        static Window * GetRootWindow(void)
        {
            return Root;
        }
        void BroadcastMessage(GuiEvent *event);
        int RunModal(Window *which);

        static void    InitUserEvent(void);
        void GetUserEvent(GuiEvent& e, int);
        void TranslateUserEvent(GuiEvent& e);

        int    GetMouseX(void)
        {
            return mx;
        }
        int    GetMouseY(void)
        {
            return my;
        }

        FGMouseCursor * CursorLoad(FGMouseCursor *cur);

        int EnableBuffering(int mode);
        int Flip(void);
        void DisableBuffering(void);

        enum { OSTYPE_LINUX=1, OSTYPE_MSDOS, OSTYPE_WIN32, OSTYPE_QNX };

        int GetOS(void);

        static void    CloseUserEvent(void);
        static void AutoRepeatEnd(void);
        static void    GetDragVector(int &a, int &b, int &c, int &d);
        static void    SetDragShape(void(*a)(int,int,int,int)=0);
        static void SetRepeatDelay(int    c1,    int    c2);

        // Object-oriented API via overloaded methods
        virtual void OnKeyPress(int) { }
        virtual void OnMouseMove(int , int) { }
        virtual void OnClick(int, int) { }
        virtual void OnContextPopup(int, int) { }
        virtual void OnStartDrag(int , int, int) {}
        virtual void OnEndDrag(int ,int, int, int, int) {}
        virtual void OnCursorOut(int)
        {
        }
};



OpenGUI 4.0.0 - final
(8. april 2003)

There are now three versions of the OpenGUI:

  1. 3.6.1c - the good old one
  2. 3.7.0 - old core with new API (supports QNX, DJGPP, etc)
  3. 4.0.0 - new core & new API (supports only LINUX, WIN32 & maybe SOLARIS)

You may read the docs about migration from 3.x first. The old 3.7.x branch will be supported in the future too. The API will be very similar in the both (3.x & 4.x) versions. The oldest one will supports QNX, DJGPP and other stuff that is supported on now but without multi-threading. The new version 4.x will support only WIN32, SOLARIS and LINUX include multithreading. The API is definitely freeze on now.

Test IT, test IT & test IT!!!


OpenGUI 4.0 will be thread-safe!
(9. march 2003)

I have started working on nearly complete rewrite of the underlying of the library. These changes targets these idioms:

  1. reentrant code for all windowed code
  2. thread-safe locking on critical sections
  3. threading will be optional
  4. Each drawable object contains PAPER, INK, FONT and PPOP and only these are used for drawing on them. set_fcolor(), set_bcolor(), set_ppop() & set_font() as the DrawBuffer methods.
  5. global version of set_fcolor(), set_bcolor(), set_ppop() & set_font(), will be removed - affect only non object code (draw_line() , fill_box() etc).
  6. The NASM assembler will be no more required.
  7. No -fPIC compile flags are necessary under LINUX & shared linking.
  8. The API has been cleaned and changes are minor (and will be well documented).
  9. Classes FileDialog() and ColorDialog may be instatiated more than once at the same time.
  10. On now no Watcom C++ or QNX OS support (because of banking video modes).
  11. Only C++ language is supported.
  12. The active EditBoxes are per window now.
  13. Most of static variables are removed.
  14. Truetype fonts will be build-in default fonts on platform with one.

First alpha release of OpenGUI 4.0 will be launch at 15. march 2003.


New alternative to the EVENTS sending

First of all, download latest OpenGUI examples.  

All the 'Controls' in the OpenGUI (aka Buttons) are inherited from this new class 'FGConnector' and you can bind these Controls with your own class.

Code fragment to get the new feature into your code (als see at new example 'connect'):

class foo : public FGConnector
{
        int a;
    public:
        foo() { a = 0; }
        virtual void OnSignal(FGConnector *sender, int val)
        {
            val = a;
            new Window(0,rand()%700, rand()%500,90,60,"Event!");
            Snd(700, 200);
        }
};

int main(int argc, char **argv)
{
    App MyApp(3,argc,argv,CWHITE,APP_ALL);
    Window *MyWnd = new Window(0,300,300,200,120,"Click to button");

    Control *eb;
    foo *x = new foo;

    eb = MyWnd->AddPushButton(68, 40, 90, 24, "New window");
    FGCONNECT(eb, x, 3);

    MyApp.Run();
    return 0;
}



New version of RHIDE 1.5 for latest REDHAT


If you are using a famous IDE from Robert Hohne - RHIDE, you can download new version from http://www.rhide.com or latest build from http://sourceforge.net/projects/rhide/ . This one don't work under RH 7.x & 8.0, probably because SlackWare Linux that was used for building. I rebuil sources from the scratch on my RH 7.3 and it's work fine. Compiling RHIDE from sources is realy complicated job, that I uploaded stripped, bzip2-ed (1.2MB), dynamic binary of RHIDE here for you. Big news is that CTRL+C works again, GCC 3.2 compatible, latest SETEDIT is used, IDE now show CLOCKS rather than used memory and disasasembler use INTEL syntax rather than ATT ;-)).



Hey folks!

I would like to visit, for curiosity only, some screenshots of your applications writed with OpenGUI library. I will upload my pictures too. You will see one here.

Kylix 3 full support

From now, the superb Borland IDE Kylix3 is supported under LINUX!


FreeType2 support (UNICODE, UTF8 with TRUETYPE)

ttf.png (8798 bytes)

Code fragment to get TTF fonts into your code:

    unsigned short uu[16] = {'h', 'e', 'l', 'l', 'o', ' ', 'w','o','r','l','d','!', 0};

    FontProperty *arial23 = new FontProperty("arir____.ttf", 23);
    FontProperty *helvetica23 = new FontProperty("helr____.ttf", 23);
    FontProperty *arial12 = new FontProperty("arir____.ttf", 12);
    FontProperty *helvetica12 = new FontProperty("helr____.ttf", 12);

    wnd->WindowTextUnicode(30,30,uu, arial23, 0,CWHITE);
    wnd->WindowTextUnicode(30,60,uu, helvetica23, 0,CWHITE);

    arial23->Shaded();
    helvetica23->Shaded();
    wnd->WindowTextUnicode(30,120,uu, arial23, CBLUELIGHT,CWHITE);
    wnd->WindowTextUnicode(30,150,uu, helvetica23, CBLUELIGHT,CWHITE);
    wnd->WindowTextUnicode(230,30,uu, arial12, 0,CWHITE);
    wnd->WindowTextUnicode(230,60,uu, helvetica12, 0,CWHITE);

    arial12->Shaded();
    helvetica12->Shaded();
    wnd->WindowTextUnicode(230,120,uu, arial12, CBLUELIGHT,CWHITE);
    wnd->WindowTextUnicode(230,150,uu, helvetica12, CBLUELIGHT,CWHITE);

    delete arial23;
    delete helvetica23;
    delete arial12;
    delete helvetica12;

New widget for EditBoxes -- FGUpDown class

updown.gif (2271 bytes)

Code fragment from window handler:

    static FGUpDown *ud1, *ud2;
    EditBox *eb;

    switch(p->GetType())
    {
        case INITEVENT:
            eb = p->wnd->AddEditBox(112, 32, 64, 64, "integer", 0, &var1, 0, -1000, 1000);
            ud1 = new FGUpDown(eb, 100);
            eb = p->wnd->AddEditBox(112, 80, 64, 64, "float", 0, &var2, 0, -10.000000, 10.000000);
            ud2 = new FGUpDown(eb, .2);
            break;
        case TERMINATEEVENT:
            delete ud1;
            delete ud2;
            break;
    }


How to - OpenGL and OpenGUI with Borland C++ 5

  1. Borland C++ 5.0 or higher is required.
  2. Download latest MesaGL 4.0.1 from www.mesa3d.org . If you have version 4.0 only, you can update one by my 4.0 to 4.0.1 patch (you must have a patch utility from Cygnus by example).
  3. Update Mesa 4.0.1 source with this patch to get the Borland friendly version.
  4. cd \Mesa-4.0.1\src
    make -f MesaGL.mak
  5. The makefile automatically install the headers & lib to the BC5 directory.
  6. Test the result - open a project into OpenGUI\examples\mesa3d and rebuild them. You must get an working WIN32 OpenGL executable.

New feature - TabPages - 27.01.2002

3c528f88.gif (3437 bytes)

Code fragment:

wnd->AddPushButton(40, 152, 64, 21, "one", 0, 0);
wnd->AddPushButton(344, 152, 64, 21, "two", 0, 0);
wnd->AddTabPage("first");
wnd->AddEditBox(32, 40, 64, 40, "input1", 0, &tmp_str, 0);
wnd->AddEditBox(3, 304, 128, 64, 40, "string input", 0, tmp, 0);
wnd->AddTabPage("second");
wnd->AddCheckButton(48, 48, "check button", 0, &tmp1, 0);
wnd->AddPointButton(264, 64, "button group", 0, &tmp2, 0);
wnd->AddPointButton(264, 88, "button group", 0, &tmp3, 0);
wnd->AddPointButton(264, 112, "button group", 0, &tmp4, 0); wnd->AddTabPage("third");
wnd->SetTabPage("second");


since 9. september 1999
e-mail: nezmar at atlas.sk