═══ 1. General overview ═══ The history of all hithero existing society is the history of class struggles. Karl Marx/Friedrich Engels Release 1.0 (Offical Version) (1. Apr. 1998) (C)opyright Stefan von Brauk, Jens von Pilgrim, Thomas Bonk, Mathias Hasselmann, Jan-Helge Bergesen 1996, 1997, 1998 The Open Objects Library (OOL) is a C++ library wich contains classes for GUIs, datatypes, multimedia and more. To use OOL it is an advantage if you have some experiance in programing using class-librarys and/or OS/2-API functions. After very nice tests in "cяt magazin" 10/96 and "Software Entwicklung" 11/96 we proudly present the newest release of the library, still very stable, but much more functionality (see History/Changes). Currently only the most modern operating system (OS/2 Warp 3 or higher) is supported, for ports to Windows NT/95 and LINUX see FAQs. This documentation is under construction and thus a little bit buggy. At http://ooldox.home.ml.org/ you can download a HTMl-version of the documentation created with doc++. ═══ 1.1. Trademarks and Service marks ═══ The following terms used in this publication are trademarks or service marks of IBM Corporation in the United States or other countries:  AIX  BookManager  C/2  C Set/2  C Set ++  Common User Access  CUA  IBM  Open Class  Operating System/2  OS/2  Personal System/2  Presentation Manager  PS/2  VisualAge  WorkFrame Windows is a trademark of Microsoft Corporation. UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Limited. Java is a trademark of Javasoft. Other company, product, and service names may be trademarks or service marks of others. Some code of the OOL is based on software which underlies the General Public License (GPL), the original code is distributed in the directory OOL\ORIG, see there for further information about the GPL. ═══ 1.2. Highlights in this version ═══ New in this version of the OOL:  TCP/IP-class:XSocket  Graphic import/export library  Crypt class  Improved documentation  dBase III - access with OOL  Course to learn to programm the OOL  mailing list, see We give help / mailing list If you are already using the OOL please read History/Changes first, it might be nessecary for you to make some changes porting your applications to the new OOL release. ═══ 1.3. Thanx ═══ In the last months we had support from different people. Special thanx to:  Eberhard Mattes for EMX and for answering our questions  Benjamin Stein for supporting us in multiple ways  Fabrizio Aversa because we can use some code of his MAVERIK CLASS LIBRARY  Bjorn Fahller because we can use some code of his YEAH! library ═══ 1.4. License ═══ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. The Open Objects Library (OOL) is copyrighted freeware 2. Redistributions of any files must retain the above copyright notice, this list of conditions and the following disclaimer. 3. You are not allowed to sell or commercially distribute the OOL or any part of it. If you want to distribute the OOL commercialy you have to apply the authors permission. 4. If you want to distribute the OOL with another product you have to apply the authors permission. 5. If you want to reprint sourcecode of the OOL you have to apply the authors permission. 6. To keep applications small, please use the OOL in your programms in the form of the DLL(s) distributed with this package. Static linkage is only allowed if you have problems using excepitons. In this case you have to say in your online- and offline documentation that your application is build with the OOL. Distribution of self-constructed DLLs is not allowed!!! 7. You are not allowed to commercialy distribute programms which base on the examples distributed with this package. 8. You must send a copy of every programm which you have developed with the OOL to the authors of the OOL (to test and enjoy ;-) ). BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ═══ 1.5. The Future of the OOL? ═══ As you may have noticed IBM isn't interested in the SOHO market any more and only supports theire professional custumors of Warp and Warp Server. From this reason there seams no need for a freeware class library for OS/2 Warp (professional users work with Visual Age/OCL). To make it clear: at the time the OOL is (nearly) complete, the platform it is designed for is dead. So, what is the future of the OOL? Port it to Windoze/Linux/Rhapsody (and who will do the wet work)? ═══ 1.6. We need Help! ═══ Writing a class-library needs a lot of time and know how. If you inspect the OOL-project you will see that a lot of functionality is implementated but also a lot of things are missing. If you have time and the know how to:  implement graphic-classes (OpenGL)  implement classes for data-propagation (XDocument?)  improve already existing classes  improve documentation  port the OOL to other compilers ( Borland...)  or port the OOL to other 32bit-plattforms (Linux, Windows NT, AIX...)  or...... you should contact the authors. ═══ 1.7. We give Help! ═══ Yes, we know: Using a class-library you have a lot of questions without an answer. Therfore we offer COMMERCIAL SUPPORT. For more informations on commercial support contact the authors There is also a OOL specific mailing list avaible: Subscribe To subscribe to the mailing list send an EMail to "majordomo@wg.saar.de", the body of the mail must only contain subscribe ool-list Unsubscribe To unsubscribe to the mailing list send an EMail to "majordomo@wg.saar.de", the body of the mail must only contain unsubscribe ool-list Help for mailing-list To get help for the mailing list send an EMail to "majordomo@wg.saar.de", the body of the mail must only contain help Send mails to the mailing-list To send questions, answers or disussion-text to the mailing list, send your EMail to "ool-list@wg.saar.de" Online documentation Frequently updated online help is avaible at: http://oliven.lhg.hib.no/~db96jhb/ool-doc/ ═══ 1.8. Bug reports ═══ If you think you found a bug in the library: 1. Make sure that you use the class/function correctly 2. Read the documentation of the function/class and the documentation of all parent classes 3. Return to number 1 4. Read the header-file of the class and return to number 1 5. RTFM 6. Make sure that the error is a bug, not a feature 7. Try to locate the error in the library 8. Try to fix the error yourself 9. If you have fixed the error send your solution to the author of the class, otherwise send a description of the error to the author. Usualy you find the EMail adress of the author in the header-file of every class. ═══ 1.9. Overview ═══ ═══ 1.9.1. Installation ═══ The following section describe the installation of the OOL for the different compiler. ═══ 1.9.1.1. Installation for EMX/GCC ═══ To develop using the Open Objects Library (OOL) you need the EMX package 0.9c for OS/2, additional the EMX runtime-package (the multithreading DLLs) must be installed on the target system(s). The makefiles delivered with OOL are for GNU MAKE, if you want to use them you need to install GNU MAKE. To get full access to all functions you need the header files of the developers toolkit (IBM) (donяt forget to enable them in os2emx.h and to add them to the CPLUS_INCLUDE statement in your config.sys), you need this files too if you want develop DIVE-related applications. If you use EMX with IBM header files you have to disable the structure-definition PRINTDEST you find in the file OOL\INCLUDE\XINCLUDE, line 41. If you donяt want to install the header files of the developers toolkit you cannot use the REXX-interface of the OOL. In this case you must modify the file OOL\INCLUDE\XINCLUDE:Delete the line #include "rexxsaa.h" (line 32) in the file, otherwise you will not be able to compile without errors. If you want to use Multimedia-related classes, you need the multimedia extensions for EMX (MM4EMX). In this case MMOS/2 must be installed on the system you develop and on the system(s) your applications should run. If you want to use the DIVE-classes you need the header files of the developers toolkit (IBM). To rebuild the library you need the header files of the developers toolkit (IBM) and the package BSDDEV.ZIP (on every EMX-server). Additionaly some import librarys must be build from the toolkit. Therefore some simple rexx-scripts are delivered in the directory OOL\TOOLS. To build the librarys change to the lib-directory of the toolkit and run the following scripts: ┌────────────────────┬────────────────────┬────────────────────┐ │Function │Rexx-Filename │Output │ ├────────────────────┼────────────────────┼────────────────────┤ │rexx import │rexxlib.cmd │rexx2emx.lib │ ├────────────────────┼────────────────────┼────────────────────┤ │java-support │javalib.cmd │java2emx.lib │ ├────────────────────┼────────────────────┼────────────────────┤ │multimedia-support │mm.cmd │mm2emx.lib │ │(including DIVE) │ │ │ ├────────────────────┼────────────────────┼────────────────────┤ │new OS2 import │oolimp.cmd │oolimp.lib │ │library │ │ │ └────────────────────┴────────────────────┴────────────────────┘ Copy the libs to your EMX libpath eg. c:\emx\lib If the OOL-files are zipped, unzip them and copy them to the place you want to. Copy the DLL(s) to a directory of your LIBPATH, for example C:\OS2\APPS\DLL. At least change the settings of EMX in the config.sys. Just add the following line to the CPLUS_INCLUDE_PATH statement: PATH/ool/include; where PATH ist the path you have copied the OOL-files to. For example,the complete statement looks like SET CPLUS_INCLUDE_PATH=c:/emx/include/cpp;c:/emx/include;c:/emx/ool/include; Now add the following line to the config.sys: SET OOL=PATH; where PATH is the path where you have copied the OOL-files to. Finaly copy the LIBs which are shipped in this package to the LIB-path of EMX, for example c:\emx\lib. (dont forget to reboot!) Known problems Because exceptions are used you MUST DISABLE ANY FORM OF OPTIMIZATION (eg. -O or -O2), otherwise in the best case your program crushes if an exception is thrown, usualy you have several problems to link your program. You may have problems with the samples if an exception is thrown (excpecialy sample9) In the DIVE-related header files of the OOL a multimedia related macro is redefined to make it work with EMX. If the compiler throws some warnings, ignore them. ═══ 1.9.1.2. Installation for Visual Age C++ ═══ If you want to use Multimedia-related classes, MMOS/2 must be installed on the system you develop and on the system(s) your applications should run, the toolkit for multimedia related stuff must be installed on your system. If the OOL-files are zipped, unzip them and copy them to the place you want to. Edit the settings of VAC++ in the config.sys:  SET INCLUDE=PATH\include;...  SET LIB=PATH\lib;...  LIBPATH=PATH\lib;... where PATH ist the path you have copied the OOL-files to. Now add the following line to the config.sys: SET OOL=PATH; where PATH is the path where you have copied the OOL-files to. If you want to develop the OOL, process installation described above. Additional you must change the paths given in the makefile of the OOL (..\OOL\SOURCE\VA.MAK), MAKE will then copy the created files to the place you need them. The library contains a C runtime library for VisualAge C++. To keep your applications small and fast you should include this library instead the VisualAge librarys. To compile use the /Gn+ /Gd+ switches, your applications must be linked against the C runtime library (OOLC3I10.lib) and os2386.lib, switch /NOD. The runtime library DLL OOLC3I03.DLL must in the current LIBPATH and must be delivered with your application. Known problems If you rebuild the OOL Visual Age C++ should be on the most recent fixlevel, BUT: I wasn't able to build the C-runtime library with the CPPOMO30.DLL of fixpack 8 (I used the original DLL instead). ═══ 1.9.1.3. Installation for Watcom C/C++ ═══ Currently we have some problems with Watcom 10.x so the librarys and DLLs for this compiler are not distributed (the makefiles for the compiler are part of the package so you are able to build these files yourself). To develop using the Open Objects Library (OOL) you need Watcom C/C++ 10.0 (or higher) and a Developer's Toolkit 3.0 (or higher). If you want to use Multimedia-related classes, MMOS/2 must be installed on the system you develop and on the system(s) your applications should run, the toolkit for multimedia related stuff must be installed on your system. If the OOL-files are zipped, unzip them and copy them to the place you want to. Edit your config.sys:  LIBPATH=PATH\lib;...  SET INCLUDE=PATH\include;...  SET LIB=PATH\lib;...  SET OOL=PATH Where PATH is the drive- and pathname where you've copied the OOL to. If you want to recompile the OOL change to your OOL directory and type nmake -f watcom.mak You're also able to make the dll's and the samples separate; only change to Source or Samples directory and type nmake -f watcom.mak Known problems Under Warp 3 and the Toolkit that came with DevCon#10, wlink wasn't able to find the function mciSendString allthough it is exported in MMPM2.LIB; so I wasn't able to compile OOLM3W03.DLL under Warp 3. Under the Warp 4 beta along with the Toolkit for Warp 4 (from the beta June 1996) it compiled and linked fine. So I compiled and linked the OOL under Warp 4; both dll's also work under Warp 3. ═══ 1.9.2. Things which dont work ═══ ═══ 1.9.2.1. Toolbars ═══ If a toolbar has the style TB_RIPABLE and the user rips the toolbar and plug it eg. at the left of the window the content of the toolbar might not be shown correctly if you have set X- or Y-offsets to the controls of the toolbar. In this case you should disable TB_RIPABLE ═══ 1.9.2.2. Graphic output ═══ The classes for painting are updated, but can make some trouble. Be careful. ═══ 1.9.2.3. Custom Controls ═══ We have started to implement some custom-controls (XChart and derived classes). Functionality is reduced, wait for the next release. ═══ 1.9.3. What the samples show you ═══ Sample1 Sample 1 is a little intro, it shows multithread-programming, building simple application windows, introduction in drag/drop and in the handler-concept of the OOL. Sample2 dbase III-access Sample3 Sample3 shows how to use the multimedia-interface of OOL, how to use he bubble-help. NEEDS MMPM/2 Sample4 Sample4 is an introduction into container-programming (the windows, not the collections!). More about handlers and drag/drop. Sample5 Sample5 shows how to construct windows from resources (which are build with the dialog-editor), including a resource DLL. Sample6 Sample6 shows how to use controls which are not so often used like:XNoteBook, XUserButton, XValueSet, XSlider, XCircularSlider.. Sample7 Sample7 is an introduction to use graphic classes and how to print. Sample8 How to use DDE:client and server-application wich communicate via DDE Sample9 Using named pipes (client/server) and semaphores Sample10 Bitmap viewer Sample11 Run Java applets in your C++ application Sample12 Using REXX within a C++ application Sample13 Example of the DIVE-interface Sample14 How to use modeless and modal dialogs. Sample15 Example of the Multiple Document Interface (MDI). Sample16 How to use socket-classes. ═══ 1.9.4. Hints ═══ Useful hints on programming with the OOL follow in the next sections. ═══ 1.9.4.1. Including headers ═══ There are two methods to include header files of the OOL in an easy way: 1. To include all header files at once (useful if you work with precompiled header) #define INCL_OOL #include "ool.h" you can also include single parts of the OOL: #define INCL_OOL_WIN //include window-classes #define INCL_OOL_FILE //include file related things #define INCL_OOL_PROCESS //include process-related (threads, semaphores) #define INCL_OOL_MM //include multimedia-classes #define INCL_OOL_JAVA //include java-classes #define INCL_OOL_DBASE //include dBase-classes #include "ool.h" 2. To include header-files one by one include the standard header of OOL (xheaders.h) and then include the header-file of the class you want to use by typing the classname with the suffix "_i", for example: #include "xheaders.h" //the standard header of the OOL #include XFrameWindow_i //class XFrameWindow #include XMenuBar_i //class XMenuBar //and so on To improve perfomance in some header-files functions are inlined, dont touch them! ═══ 1.9.4.2. compiling/linking ═══ You have to compile/link your programms multithreaded because the OOL - DLLs are build multithreaded too (otherwise you will have problems to start your application). Refer to your compilers documentation. ═══ 1.9.4.3. Destructors ═══ Destructors of windows, menus, toolbars etc are called automaticaly never call the destructor of a window! From this reason you must be carefull with constructions like the following: //wrong way: void xyz(void) { XMenuBar menu(...); //the menubar is constructed blabla //do something //the destructor of XMenuBar is called when the //function is left and the menu is destroyed! } //correct: void xyz(void) { XMenuBar * menu = new XMenuBar(...); //the menubar is constructed blabla //do something //the destructor of XMenuBar is not called! //the destructor of XMenuBar is called when //the user requests closing the associated window //automaticaly. } ═══ 1.9.5. Create new window classes ═══ After programming a while with OOL you may need to create new window classes. There are two methods to do this:  You want to create a class with a window-type wich is known from the OS, e.g. a window-type wich is registered from a DLL. In this case you need to know with which name that window-type is registered (a value like WC_* ). You should derive the C++ class from XControl and override all functions from XWindow/XControl you need to handle the window.  You may create a complete new class. In this case you have to handle nearly everything, escpacialy drawing the window. Derive your C++ class from XUserWindow, override Draw() and all other methods you have to handle. There a some classes in the OOL which show you how build window-classes yourself:XToolBar, XBubbleHelp, XChart and XPie. ═══ 1.9.6. Templates ═══ The OOL does not contain templates/container classes because the Standard Template Library (STL) is a new standard in C++ and contains lots of fast templates. At ftp://ftp.cs.rpi.edu/pub/stl you can download the STL. ═══ 1.9.7. Other ═══ Other related information follows ═══ 1.9.7.1. Exception-Handling ═══ The OOL throws exceptions (class XException and derived) under folowing circumstances:  A window, control, framewindow or menu could not be created  A resource-library could not be loaded  A rexx-interface could not be created Refer to the samples how to catch exceptions. If the methods throwing exception are documentated you usualy find a description of the type of the thrown exception in the docs. EMX ONLY: Since the OOL is compiled with the -fhandle-exceptions switch you can use exception-handling in your applications if you use OOL. Because exception-handling of EMX/GCC does not work correctly, you may have some problems to catch exceptions from the OOL. ═══ 1.9.7.2. DLL-Naming conventions ═══ DLLs and LIBs of the OOL project follow these naming-conventions, you must decide which library(s) you need to include in your project (depending on the compiler you use and which modules of the OOL you need). The letters of the names of the OOL-Librarys/DLLs have the following meaning: ┌───────┬───────┬──────────┬─────────┬───────┬──────────────────────────────┐ │1 - 3 │4 │5 │6 │7 - 8 │meaning │ │always │module │operating │compiler │version│ │ │"OOL" │index │system │ │ │ │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"C" │- │- │- │C runtime library (only for │ │ │ │ │ │ │VisualAge C++ avaible) │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"J" │- │- │- │Java related stuff │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"M" │- │- │- │multimedia-extensions │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"T" │- │- │- │TCP/IP related │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"W" │- │- │- │window-related stuff, the main│ │ │ │ │ │ │module │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"Y" │- │- │- │Crypt-class │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"1" │- │- │- │DB2/2 database class (XTable) │ │ │ │ │ │ │(removed from Release 1.0) │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │"2" │- │- │- │DBase III database classes │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │"3" │- │- │OS/2 Warp 3/4 │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │"E" │- │EMX/GCC │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │"I" │- │IBM Visual Age C++ 3.0 │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │"W" │- │Watcom C/C++ │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │- │"01" │alpha release 1 │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │- │"02" │alpha release 2 (no public │ │ │ │ │ │ │version) │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │- │"03" │Beta 1 │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │- │"04" │Beta 2 (no public version) │ ├───────┼───────┼──────────┼─────────┼───────┼──────────────────────────────┤ │- │- │- │- │"10" │Release 1.0 (this version) │ └───────┴───────┴──────────┴─────────┴───────┴──────────────────────────────┘ Always needed is OOLRES.DLL which contains dialog-templates for printer-support and other resources. If graphic import/export-functionality is needed OOLGLIB.DLL and GBM.DLL must be installed. ═══ 1.9.8. History/Changes ═══  Beta 2 / Release 1 - The class XWebView and the DB/2 related classes have been removed. From this reason Sample2 and Sample10 are replaced. - Help-files improved, new HTML-sites - new "Course to the OOL" - new graphic import/export library - Bug-fixes/updates -- Missing destructors completed -- Bugs in XFrameWindow::XFrameWindow() eleminated -- Bug in XFrameWindow::GetMenu() eleminated -- Bug in XIO::Read(XString LONG) eleminated -- Bug in XDDE::SendCommand() eleminated -- Bug in XKeyboardEvent eleminated -- terminating-problems in XApplication fixed -- Problems with event-handling in XModalDialog fixed -- bitmaps can now be loaded from a (resource-) DLL -- multimedia-classes dont use any longer the slow string-API of the OS/2 media interface -- Bug in XThread::Terminate eleminated - Functions/Parameters changed -- XApplication An object of XApplication is now automaticaly created. You cannot derive a class of XApplication any longer. Classes like XClipBoard, XProfile etc. donяt need the application in the constructor, they have been changed. Also you cannot access the application with XFrameWindow::GetProcess() any longer, call the static method XApplication::GetApplication() instead. You need to update your programs, read the documentation of XApplication! -- Windows Most windows have now a second constructor where you can use an ID instead a XResource. -- Container-controls If the user edits the text of a container-column or container-object this events are not any longer posted to the event-handler, virtual methods of these objects are called instead. -- XDDE -- Parameters in XFile::Open() changed -- XNoteBook -- XNoteBookPage -- XFileFind -- Additonal constructors for XDialog and derived, XFrameWindow and derived -- XDialog::QueryForClose() removed, use DoCommand() instead - some new classes avaible: -- Window related: - XCalendarControl - XDateEntryField - XMDIClient - XMDIServer - XNoteBookHandler - XNoteBookEvent - XMessage -- TCP/IP related - XSocket -- multimedia related - XCDPlayer -- Database access (dBase III) - XDBaseException - XDBaseFile - XDBaseField - XDBaseRecord -- Other - XAtom - some new samples  Beta 1 - Support for Visual Age C++ and Watcom. - changed to EMX 0.9c - the library is split in multiple DLLs, new DLL-names - the OOL throws exceptions - "empty" classes are now "filled", means they have now some or many member-functions (e.g. XValueSet) - some new classes avaible: -- Window related: - XBubbleHelp - XExtendedMessageBox - XFontDialog - XIcon - XJavaApp and related - XModalDialog - XModelessDialog - XNoteBook - XNoteBookPage - XWebView (not avaible for EMX) -- Multimedia - XBlitterWindow and related (DIVE) -- Communication/System related - XDDE - XEventSemaphore - XFileInfo - XMutexSemaphore - XNamedPipeClient - XNamedPipeServer - XPipe - XPrinterDevice - XProfile - XRexxInterface - XTimer -- Database access - XTable (not avaible for EMX and Watcom C/C++) -- Other - XException - XRexxException - XSemaphoreException - XTableException - most classes have new member-functions (e.g. XFile, XEntryField, XComboBox) - bug(s) fixed in:XUserButton, XContainerEditEvent, XContainerControl, XGraphicDevice, XGraphicObject, XBitmap, XText, XString, XMultiLineEntry, XKeyboardHandler - graphic classes (XGraphicObject and derived) are updated and can be used carefuly, functionality is still pour - direct editing in container-controls supported (see sample4) - user-defined drawing in listboxes and menus supported (see sample6), also in container-controls (sample4) - the names of member-functions have been modified: 1. the name of a function wich set data now starts with Set, example:SetText 2. the name of a function wich retrive data now starts with Get, example:GetText, in earlier versions of the OOL they often started with Query 3. the name of a function wich ask for a boolean state now starts with Is, example:IsVisible - XContainerHandler must now be attached to the container-controls, not to their owner (Sample4), so XContainerHandler::GetWindow() in container-event returns the control, not the owner! - XPopupMenu can now be constructed with XWindow or a derived class - DoSize has now two parameters, you must change your apps if you have overriden DoSize (otherwise DoSize is never called). - If in a constructor of XFrameWindow() or derived WIN_VISIBLE is not set, the window is not displayed. - Parameters in XFile::Open() changed! - new samples: -- sample6 - rare-used controls, notebooks -- sample7 - using graphic objects and printer -- sample8 - using DDE -- sample9 - using named pipes -- sample10 - DB2/2 access -- sample11 - Java support -- sample12 - Rexx interface  alpha release 2 (not documentated) ═══ 1.10. FAQs ═══ 1. Will you port the OOL to LINUX (would be great)? Yes, would be great. A basic port to Win95/NT is done (frame-windows, simple controls etc.), but we don't have the time to do the ports to other plattforms. If you would like to port the OOL to other plattforms, mail 2. What is AutoDoc? AutoDoc is a tool to create documentation automaticaly :-) It creates program-documentation in HTML-format out from C/C++ sourcecode including derivation and comments inserted by the programmer. Shareware-version (perhaps) soon avaible! 3. Where is OS2ME.H? EMX ONLY: OS2ME.H is a file from the multimedia-extensions for EMX, you need to install them to compile multmedia-related stuff. The file MM4EMX.ZIP should be found on the Hobbes-CD or on every server which distributes EMX. ═══ 2. The OOL-Course ═══ ═══ 2.1. The Open Object Library (OOL) - Course of Instruction ═══ UNDER CONSTRUCTION 20. December 1997 (c)opyright Stefan von Brauk, Thomas Bonk This document is a short tutorial for programmers who want to use the Open Objects Library (OOL). You should read every section (even if a chapter didn't seem interesting for you), many concepts of the OOL are discussed, to know them may reduce trouble later. The sourcecode shown in this this document is often avaible as a simple, but complete project, if so you find a hint in the text where to find the source. Like described above this is a tutorial and shows only the basic usage of the OOL, in many cases the information provided here will not be enaugh for you. ═══ 2.2. First Steps ═══ ═══ 2.2.1. Creating a basic application ═══ In some class librarys (and in earlier versions of the OOL) it is nessacary to create an instanance of an application class. This application class usualy represents the current process and some service functions. In this version of the OOL an application object is created automaticaly when the function main() of your application is reached. This is an instance of XApplication wich can be accessed with the static function XApplication::GetApplication(). E.g. if you need a pointer to the application object you will code: int main() { //now we get a pointer to the //application object XApplication * currentApp = XApplication::GetApplication(); } You need this pointer allways to make the application work, it does not start itself because you must create a window or dialog (if you use windows or dialogs in your application) before the application starts to work. Having this things in mind a simple main-method looks like: int main() { //we get a pointer to the application object XApplication * currentApp = XApplication::GetApplication(); //here a window is created myWindow * w(...); //now start the application currentApp->Start(); } ═══ 2.2.2. Creating the first frame window ═══ Usualy the first thing you want to do is to create a main window. The following source describes how to create an instance of the frame window class XFrameWindow: XFrameWindow * myWindow = new XFrameWindow( /* parameters */ ); This part of code produces a frame window, but is not very useful: To handle events etc. it is nessecary to overwrite some functions of the class XFrameWindow. Therfore you have to derive a class of XFrameWindow (the following code is avaible in the directory "hello1"): class MyWindow: public XFrameWindow { public: void Draw(); BOOL DoCommand(LONG); MyWindow(); }; Here two methods are overwriten and a constructor for our new class is declared. At first we have to create the construtor. In this case we create a simple window which has no menus or other controls except a little text, we give the window the window-id 100, the title should be "Hello World" and the style of the window should be the default frame window style. MyWindow :: MyWindow( ): XFrameWindow( 100 , "Hello world!", XFrameWindow::defaultStyle) { //at first we define a color which is used to paint the background //we chose white as background color XColor color(COL_WHITE); SetBackgroundColor( &color ); //create a text //the owner of the text is this window, show the text "Hello World" XStaticText * text = new XStaticText( this, "Hello world!", XRect( 100, 100, 150, 20)); //Set the position of this window //left-lower corner is 100,100, width is 300, height is 200 XRect rect(100,100,300,200); SetSize(&rect); //make this window the active window Activate(); } Now the overwritten methods must be implementated. The method Draw() is overwritten so we can draw the content of the window, the implementation of this methods is very simple: void MyWindow :: Draw() { //just fill the background, the text will draw itself FillBackground(); } The method DoCommand() allows us to receive commands which are send from menus or toolbars, in this first sample we create this method, but dont use it, but we must return a value! We return FALSE to show the library that we have not handled the command. BOOL MyWindow :: DoCommand(LONG com) { //at this point we dont care about commands return FALSE; } At least we need a main-method in which our window is created and the application starts to work: int main() { //we get a pointer to the application object XApplication * currentApp = XApplication::GetApplication(); //here a window is created MyWindow * myWin = new MyWindow(); //no start the application currentApp->Start(); } ═══ 2.2.3. Error handling ═══ Usualy errors apearing while your program is runing are shown by the return value of a member function, eg. a function returns FALSE if a method was not succesful or an errocode is returned, eg. if a file could be opened a method returns zero, if the file couldn't be opened the errorcode of the operating system is returned. If a very serious error ocures, the OOL throws exceptions of the type XException (and derived classes), you can catch them in the usual manner: try { MyWindow * window = new MyWindow( /*parameters*/ ); // do something with the window } catch( XException&exception) { // show the error exception.ShowError(); } ═══ 2.2.4. More about frame windows ═══ If you have compiled the last example and tested it, you may have seen that the text "Hello world" is not moved if the size of the frame window changes. Perhaps you want to display the text centered, in this case we need to handle the sizing of the frame window. At first we have to overwrite the method XFrameWindow::DoSize() (the code is avaible in the directory "hello2") class MyWindow: public XFrameWindow { public: ...... void DoSize(XSize *); }; and create an implementation: void MyWindow :: DoSize(XSize * size ) { } As you can see we have a little problem: we dont have a pointer to the text-object we created in the constructor of the frame window! There are two methods to solve this problem: 1. Store the pointer The simple way is to store the pointer to the object in the class MyWindow, simply declare a member like class MyWindow: public XFrameWindow { private: XStaticText * text; public: //methods }; Once created you access the text object about this pointer. This method is simple and fast, but expensive: for ever window created on the frame window 4 bytes are used. 2. Use window-IDs The second method is to give unique IDs for the child windows. Each window gets an ID in its constructor like XStaticText * text = new XStaticText( this, "Hello world!", XRect(), TX_CENTER, 300); (here the ID is 300). If the window is created you can access it with the member function GetWindow(), eg. XWindow * text = GetWindow(300); or, if you have to make a typecast XStaticText * text = (XStaticText*) GetWindow(300); This method is not so expensive like the first one but is a little bit slower (I prefer the second). Warning: if a window does not exist with the requested ID GetWindow() returns NULL! Asuming we chose the second method, the constructor of the text object must be changed to: XStaticText * text = new XStaticText( this, "Hello world!", XRect( 100, 100, 150, 20), TX_CENTER, 300); The method DoSize() of the frame window looks like: void MyWindow :: DoSize(XSize * size ) { XWindow * text = GetWindow(300); if(text) //is the text object created? { //calculate the new size/position of the text object XRect newSize; newSize.SetX( size->GetWidth() / 2 - 75 ); newSize.SetY( size->GetHeight() / 2 - 10 ); newSize.SetWidth( 150 ); newSize.SetHeight( 20 ); text->SetSize( &newSize ); } } You may have noticed above that windows are allways created with the operator new(). This is nessacary because the destructor of a window-object is called automaticaly when the window is closed. The destructors of all child windows, menus and toolbars are called also. If you would code in the main()-function int main() { //.... MyWindow( /* parameters */ ); //.... } the destructor of myWindow would be called two times: first time when the user close the window, second time when the main()-function will be left, an error ocures! The same effect is reached if you create child windows in the constructor of the frame window like: class myWindow: public XFrameWindow { XEntryField entryField; public: //methods }; MyWindow::MyWindow(): XFrameWindow(/* parameters */), entryField(/* parameters */) { //other code } Here the destructor of entryField would be called two times too: 1. The destructor of entryField is called automaticaly from the OOL when MyWindow is cloesed 2. When MyWindow is destructed the destructor of entryField is called Another error related to this problem: MyWindow::MyWindow(): XFrameWindow( /* parameters */) { XEntryField entryField(/* parameters */); } Here the destructor is called when the constructor of MyWindow is left! To beware yourself from the described problems allways use new(). Like described above you may store the pointer to created child windows in your frame window class or you can use the method GetWindow() to access child windows. ═══ 2.2.5. Windows with menus and toolbars ═══ You usualy want to give the user the chance to select some actions to be executed by your application. One method is to create a menubar for your frame window. At the first step you create a menu in the program resource file (*.rc, see Toolkit-documentation for details). In the source code you can load this menu with two methods (the following code is avaible in directory "menu1"): 1. You give the frame window the same ID like the menubar and specify the style FRM_MENU which shows the OS that a menubar should be created. This way is very simple: //we asume that the menubar has the ID 200 MyWindow::MyWindow(): XFrameWindow( 200, "Hello world!", FRM_MENU | XFrameWindow::defaultStyle ) { } 2. You may want to load the menubar dynamicaly. This method has the advantage that you can chose at runtime which menu to load (e.g. if you have menubars for multiple languages). In this case you code: //we asume that the menubar has the ID 200 MyWindow::MyWindow(): XFrameWindow( 0, //ID is not nessacary "Hello world!", XFrameWindow::defaultStyle ) { XMenuBar * menu = new XMenuBar(this, 200); } (remember that the destructors of the menubar are called automaticaly). Independent of which way you created the menubar you need a method where you can handle the commands send from the menubar when the user selected an item of the menu. Like described above you have to overwrite the method DoCommand(): class MyWindow: public XFrameWindow { public: //methods BOOL DoCommand(LONG command); }; The method DoCommand() allows you to handle the commands, the parameter command has the ID of the selected menu item. Usualy you use symbolic names for the menu IDs, like #define IDM_MAIN 200 //the ID of the main menu #define IDM_FILE 210 //ID of the submenu "file" #define IDM_FILE_OPEN 211 //ID of the menu item "file-open" //and so on Done so the commands can now be handled. Usualy you create a "switch()"-block to determine which command was send: BOOL MyWindow :: DoCommand(LONG command) { switch( command ) { case IDM_FILE_OPEN: //handle the command to open a file break; case IDM_FILE_CLOSE: //handle the command to close a file break; default: return FALSE; //show the library that we did not handle the command } return TRUE; //show the library that we have handled the command } Another way to allow the user to make some choices is to create a toolbar. XToolBar * toolBar = new XToolBar( this ); Now you can add control-windows like buttons, combo-boxes etc. to this toolbar. If you add push-buttons to the toolbar every time this button is pressed a command with the ID of that button is send to the method DoCommand() of the frame window the toolbar belongs to. From this reason you must make shure to give the buttons unique IDs (it is a good idea to give a button the ID of the corresponding menu item). Adding controls to toolbars is done with two steps: the first is to create the control with the the toolbar as parent, the second step is to add the control with the toolbars method AddWindow(): MyWindow::MyWindow():XFrameWindow(...) { XToolBar * toolBar = new XToolBar( this ); XPushButton * button = new XPushButton( toolbar, XRect( 0,0,40,20), IDM_FILE_OPEN, WIN_VISIBLE, "Test"); toolbar->AddWindow( button ); } ═══ 2.3. More about windows ═══ With the last section you are able to create a basic window, but the functionality of that window may be not enaugh comlex for your purposuals. The next sections describe how to programm windows in a more difficult way. ═══ 2.3.1. Event Handling ═══ Often you need more information of the users action than simple commands send by menus, e.g. you need to know if the user selected an item of a listbox or something else. This informations are provided by events. The following sections describe the differnce between commands and events and how to use events. ═══ 2.3.1.1. Events vs. Commands ═══ At first we have to know the differnce between events and commands: 1. Commands are send from menubars, popup-menus and push-buttons when the user selected a menu item or pressed a push-button. The only avaible information is the ID of menu item/push-button which was selected, this ID is send to the DoCommand()-method of the window the menu/button belongs too (in the case of toolbars the commands are send from the toolbar to the owner window). 2. Events are more complex: if the user edit the the text of an entry-field or select an item of a listbox an event is send from the library which can be handled by the application. ═══ 2.3.1.2. The concept of handling events in the OOL ═══ Like described above events are more complex than commands. The OOL has two types of events: simple events and complex events: 1. A simple event occures if the user edits a text or selects an item of a listbox. This events are encapsulated in the class XControlEvent, if an event ocures an instance of XControlEvent is send to the method DoControl() of the owner window of the control window that send the event. To catch this events you need to overwrite this method. 2. There are some more complex events you might to handle like keyboard-input, mouse-events or drawing events. For this events special event-classes are designed like XMouseEvent, XItemDrawEvent etc., to catch these events there are special handler classes needed: eg. if you want to handle a XMouseEvent you need a XMouseHandler, for XKeyboardEvents a XKeyboardHandler is needed ... ═══ 2.3.1.3. Handling simple events ═══ A simple event ocures when a control-window like a listbox is scrolled, an item is selected etc. To catch this events you need to overwrite the method DoControl() of the owner window. void MyWindow::DoControl( XControlEvent * event) { } As you see a pointer to a XControlEvent-object is send to this method, from the event-object infomation about the event is avaible:  Which window send the event? With the member method XControlEvent::GetWindowID() you access the window-ID of the window which send the event, with XControlEvent::GetWindow() you access a pointer to that window.  What type of event? With XControlEvent::GetEventID() you receive the ID of the event. In XControlEvent this IDs are possible: ┌────────────────────┬────────────────────────────────────────┐ │WIN_CHANGED │the content of the client has changed │ ├────────────────────┼────────────────────────────────────────┤ │WIN_DBLCLICK │the user double-clicked on the window │ ├────────────────────┼────────────────────────────────────────┤ │WIN_PAINT │the window will be redrawn │ ├────────────────────┼────────────────────────────────────────┤ │WIN_ENTER │the user pressed ENTER │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SELECTED │an item of the window was selected │ ├────────────────────┼────────────────────────────────────────┤ │WIN_VSCROLL │the window scrolls it contents │ ├────────────────────┼────────────────────────────────────────┤ │WIN_HSCROLL │the window scrolls it contents │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SETFOCUS │the window recieves the focus │ ├────────────────────┼────────────────────────────────────────┤ │WIN_KILLFOCUS │the window lost the focus │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SHOWLIST │the list of a XComboBox will be │ │ │displayed │ ├────────────────────┼────────────────────────────────────────┤ │WIN_TRACK │the user tracks the window (in XSlider) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_ENDTRACK │the user stopped tracking (in XSlider) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_UPARROW │the user pressed the arrow "up" (in │ │ │XSpinButton) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_DOWNARROW │the user pressed the arrow "down" (in │ │ │XSpinButton) │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_PLAYED │a media-window has completed playing a │ │ │file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_PAUSED │a media-window paused playing a file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_STOPED │a media-window stoped playing a file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_REWINDED │a media-window completed rewinding a │ │ │file │ └────────────────────┴────────────────────────────────────────┘ The types of events you can catch are depending of the used controls, eg. a simple entryfield cannot send an event with the ID WIN_VSCROLL, events with the prefix MEDIA_ can only send by multimedia-windows (see below). If we have created a frame window with some child windows like (the following source is avaible in directory "event1"): MyWindow :: MyWindow( ): XFrameWindow( /*parameters*/ ) { //create a combobox XComboBox * combo = new XComboBox( this, XRect( 20, 100, 200, 90), IDC_LISTNAME, CB_DROPDOWNLIST | WIN_VISIBLE); //create a simple entry field XEntryField * entry = new XEntryField( this, XRect( 20, 60, 100, 20), IDE_ENTRYNAME, ES_MARGIN | EN_LEFT | WIN_VISIBLE); } we can code the event handling for these child windows: void MyWindow::DoControl( XControlEvent * event) { switch( event->GetEventID()) // what type of event? { case WIN_CHANGED: // the content of the window changed if( event->GetWindowID() == IDE_ENTRYNAME) // in this case we are only interested { // for the window with the ID IDE_ENTRYNAME XString buffer; event->GetWindow()->GetText( &buffer ); // here we read the new text of the window // do something with the text } break; case WIN_SELECTED: // an item was selected if( event->GetWindowID() == IDC_LISTNAME) // in this case we are only inerested { // for a combobox with the ID IDL_LISTNAME XString buffer; // WARNING: the following typecast ist only // allowed if you are shure, that the window // IS a combobox ((XComboBox*) event->GetWindow())->GetText( &buffer ); } break; } } ═══ 2.3.1.4. Handling complex events ═══ To handle complex events unfortunatly more code is needed. Like described above for each type of complex event a pair of event class and event handler class is need like: XMouseEvent - XMouseHandler. The handler-classes work is to catch events of the needed type: XMouseHandler can only catch events of the type XMouseEvent. Currently in the OOL following handler-classes (and related event classes) are avaible:  XBackgroundDrawHandler  XContainerHandler  XDragHandler  XKeyboardHandler  XItemDrawHandler  XMouseHandler  XNoteBookHandler  XStyleHandler  XTimer To catch and handle events you have to overwrite the method HandleEvent() of a event handler class. Eg. if you want to handle mouse events for a window you code (source is avaible in directory "event2"): class MyMouseHandler: public XMouseHandler { public: MyMouseHandler( XWindow * w): XMouseHandler(w) {;} BOOL HandleEvent(XMouseEvent * ); // in this method our work will be done }; The method HandleEvent() differs between the differen handler classes by the type of event class given in the first parameter. Also the avaible information between the different event class changes (see documentation of the event classes). In this sample we receive about the method GetEventID() which mouse aktion is to handle: BOOL MyMouseHandler :: HandleEvent(XMouseEvent * event) { switch( event->GetEventID()) // which event? { case MOU_BTN1DOWN: // left mouse button pressed XProcess::Beep( 200, 200); // use the horn break; case MOU_BTN2DOWN: // right mouse button pressed XProcess::Beep( 400, 200); break; } return TRUE; //show the library that we handled the event } At least we must attach the handler to the window for which events should be handled: MyWindow::MyWindow(): XFrameWindow( /*parameters*/ ) { //init-code MyMouseHandler * handler = new MyMouseHandler(this); } Like child-windows, menus etc. the destructors of handlers are called automaticaly! For all handler classes the way of coding is the same: Derive a class of the needed handler class, overwrite the constructor and the method HandleEvent(), code your event-handling in the method and attach the handler to the needed window. The difference between the events is the functionality of the event-classes and the event-IDs returned by these classes. ═══ 2.3.2. Creating frame windows from resources ═══ One method to create frame windows is to create the frame window and its child windows at runtime like shown in the samples above: first you create a frame window, then the child windows are created dynamicaly Another way is to build a resource file with a dialog editor and then create the window from this resource file. In the resource file the desciption of the window looks like DLGTEMPLATE ID_MYINDOW LOADONCALL MOVEABLE DISCARDABLE BEGIN DIALOG "", ID_MYWINDOW, 31, 32, 153, 106, NOT FS_DLGBORDER | WS_VISIBLE BEGIN ENTRYFIELD ", 106, 45, 86, 99, 8, ES_MARGIN LTEXT "Name:", 105, 13, 86, 25, 8 //other child windows END END This resourcefile will be compiled with the resource compiler and linked to the EXE-file from which the window dscription can be loaded. If you want to create a frame window this way the code looks like MyWindow::MyWindow():XFrameWindow( ID_MYWINDOW, "Hello world", XFrameWindow::defaultStyle, XRect(), NULL, TRUE) { } The last parameter send to the constructor of XFrameWindow shows the library to create the window from the resources (make shure that the used ID in the constructor is the same as used for the resource). Another way to build frame windows from resources is that the resources are not linked to the EXE-file but are linked to a DLL (see your compiler documentation for details). In this case we need to use the class XResource. This class is used to identify a resource: 1. the ID of the resource 2. the "container" of the resource: in which DLL or executable the resource resides Eg. if your application should support two languages you create two resource-DLLs, one for the first language, one for the second one. At runtime you decide which DLL to use: XResourceLibrary * resourceLib; if(language == ENGLISH) resoucelib = new XResourceLibrary( "english.dll" ); else resoucelib = new XResourceLibrary( "german.dll" ); XResource resource( ID_MYWINDOW, resourceLib); A resource constructed this way you can pass to the constructor of XFrameWindow. If you have enabled the build-from-resource the frame window is loaded from the DLL you have specified (make shure that the ID of the resource is the same in the DLLs): MyWindow::MyWindow( XResource * resource):XFrameWindow( resource, // <= "Hello world!", XFrameWindow::defaultStyle, XRect(), NULL, TRUE) Another method is to change the resource-library used by XApplication. The class XApplication creates a XResourceLibrary which holds the resources linked to the EXE-file. All resources which are identified only by theire ID and not with a XResourceLibrary are loaded from the XResourceLibrary of the XApplication class. If we want to load all resources now from a DLL we can replace the XResourceLibrary used by XApplication with our resource-DLL void main ( void) { XResourceLibrary * resourceLib; if(language == ENGLISH) resoucelib = new XResourceLibrary( "english.dll" ); else resoucelib = new XResourceLibrary( "german.dll" ); //we set the resource-library a the actual library for the application, all resorces //will be loaded from this library XApplication::GetApplication()->SetResourceLibrary( resourceLib ); //other code follows here .... } Warning::ehp2. if you code this way all resources you use must be avaible in the loaded DLL. Usualy bitmaps and icons are not language-dependent and should be linked only to the EXE-file. In this case you shouldnt replace the XResourceLibrary from XApplication and work with XResource instead. More warnings::ehp2. If you load a frame window from a resource-DLL and specify the style FRM_MENU you must make shure that the menu-resource is avaible in the loaded DLL. The settings you make in the dialog editor for the frame window are not used, the style of the frame is defined by the construtor settings. For frame windows defined by resources you have to disable in the dialog editor: 1. system menu 2. title bar It is a very good idea to use dialogs instead frame-windows if you want to load your window from resources (see next section). ═══ 2.3.3. Dialogs ═══ ═══ 2.3.3.1. Dialogs vs. frame windows ═══ As you have seen above frame windows are very flexibe to use but sometimes a little bit complicated to code. The advantage of dialogs is that they are simple to use and work (sometimes) a little bit faster. Usualy a dialog is designed in a dialog editor, the dialog is then created from the resource file produced by the dialog editor. In the OOL you have the choice between modal and modless dialogs (the following code is avaible in the directory "dialogs"). ═══ 2.3.3.2. Modal ═══ Dialogs Modal dialogs are working application-modal: if a modal dialog is open no other control except these from the modal dialog can be used. To create a modal dialog the dialog must be defined in the resources, then it can be created: // "this" is a pointer to a parent window XModalDialog * dlg = new XModalDialog( IDM_MODALDIALOG, this); (you can also create a dialog from a resource-DLL like decribed for frame windows). At this point the modal dialog exists but does not work, we have to call the Start()-method of the dialog: LONG result = dlg->Start(); The great advantage of modal dialogs is that the code which follows after the call of Start() is not executed until the method Start() returns! (If you would create here a frame window the code would be executed when the constructor of the frame window is left). When the method Start() is finished it returns the ID of the control window that finished the modal dialog, usualy it will be a pushbutton like "OK" or "Cancel", so you can decide how to continue. Warning: when the method Start() returns the dialog-object is destroyed! You cannot access windows of the dialog neither its data. From this reason you should derive your own class from XModalDialog and handle in the method DoCommand() the commands. ═══ 2.3.3.3. Modeless ═══ Dialogs Unlike modal dialogs modeless dialogs are not modal %-), that means other windows can be used while the modeless dialog is open. To create a dialog (it must be defined in the resources) you simply cal the constructor: XModelessDialog * dlg = new XModelessDialog( IDM_MODALDIALOG ); Usualy you have to derive your own class from XModelessDialog and overwrite the methods DoCommand(), DoControl() etc. ═══ 2.3.4. More about control windows ═══ In the samples above you have seen that usualy it is very simple to use a control window like an entry field or a listbox: 1. create the control window with the new() operator or load a complete frame window/dialog from the resources 2. init the control window, eg. set the text or fill the listbox 3. if nessacary use the DoControl()-method of the owner window to react to events send from the control window As seen at the complex events you may also add a event handler class to a control window if more complex event should be handled, eg. if you want to draw the content of a listbox yourself. OS/2 provides two types of control windows that are more difficult to handle: notebooks and container-controls. ═══ 2.3.4.1. Notebooks ═══ Notebooks are espacially used for settings of programms etc. A notebook contains one ore more pages, at first you have to create the notebook itself, then add the pages. 1. The notebook can be created like any other conntrol, you can use new() or define the notbook in the resources for a frame window or dialog (code is avaible int directory "notebook"): XNoteBook * noteBook = new XNoteBook( this, // "this" is a pointer to the owner window XRect( 10,10,200,300), // position and size ID_NOTEBOOK, // ID NB_TABBEDDIALOG|WIN_VISIBLE|NB_SOLIDBIND|NB_BACKPAGESBR|NB_SQUARETABS|NB_TABTEXTCENTER|NB_STATUSTEXTLEFT, "8.Helv"); // font to use 2. The second step is to fill the notbook with pages (you must not use a notebook without pages!). Pages are like dialogs defined in the resources of the application or can be created dynamicaly at runtime: XNoteBookPage * page = new XNoteBookPage( noteBook, // the owner of the page is the notebook-control ID_PAGE); // the ID of the resource Like described above notebook pages can be loaded from resource-DLLs like frame windows (see constructor for XNoteBookPage for details). Notebook pages have the same functionality like dialogs/frame windows, if you need to catch events from controls belonging to the page you have to derive your own class from XNoteBookPage and overwrite the nessacary methods like DoControl() etc. If you want to add windows to a notebook page dynamicaly ( using new() ) you have to set the page to the top first: page->SetTop(); XPushButton * button = new XPushButton( page, //the page is the owner XRect( 60, 20, 70, 25), ID_OK, WIN_VISIBLE, "OK" ); As described above the simple events should be caught with the DoControl() method of the pages, complex events send from the notbokk (e.g. if the user selects a page) are send in the form of a XNoteBookEvent, to catch them you have to install a handler class (see above) of the type XNoteBookHandler. ═══ 2.3.4.2. Container controls ═══ Container can be created like any other control using new() or resources, but it is more difficult to init them and fill them with data. ═══ 2.3.4.2.1. Creating the container ═══ the first step is to create the container, you may define it in the resources for a window/dialog or create it dynamicaly (the following code is avaible in directory "contain", see "samples\sample4" for more detailed instructions programming container controls): container = new XContainerControl( this, XRect(100,100,30,200), ID_CONTAINER, WIN_BORDER|WIN_VISIBLE); ═══ 2.3.4.2.2. Init ═══ The container control provides different views like icon, text or tree view, other settings like size of icons/bitmaps etc can made too. To make this settings the class XContainerInfo is used to query/set this information. Any of this information can be changed at runtime. To change settings of a container control you would code XContainerInfo info( "Departments", CO_TREE | CO_TITLE | CO_TREELINE ); //we use only a very small icon XSize size(16, 16); info.SetBitmapSize( &size ); info.SetTreeBitmapSize( &size ); //enable the changes container->SetInfo( &info); As you see the container control is initialized with the XContainerInfo. If you would do so to change the container settings at runtime all settings would be overriden. To prevent this behaviour 1. query the current settings of the container 2. change the settings you need eg XContainerInfo info; //get the current setings container->GetInfo( &info); //we use only a very small icon XSize size(16, 16); info.SetBitmapSize( &size ); info.SetTreeBitmapSize( &size ); //enable the changes container->SetInfo( &info); ═══ 2.3.4.2.3. Inserting columns (detailed view only) ═══ If your container control is in detailed view you have to insert columns, the class XContainerColumn is used for this. XContainerColumn * col1 = new XContainerColumn( container, //the owner "Column 1", //title of the column 0, //first column COL_HORZSEPARATOR | COL_STRING | COL_SEPARATOR, COL_LEFT | COL_FITITLEREADONLY | COL_HORZSEPARATOR | COL_TOP ); //settings //insert the column container->InsertColumn( col1 ); XContainerColumn * col2 = new XContainerColumn( container, //owner "Column 2", //title 1, //second column COL_SEPARATOR | COL_HORZSEPARATOR | COL_STRING, COL_LEFT | COL_FITITLEREADONLY | COL_HORZSEPARATOR | COL_TOP ); //insert the second column behind the first one container->InsertColumn( col2, col1 ); //redraw the container container->UpdateColumns(); ═══ 2.3.4.2.4. Adding objects ═══ Objects of a container are represented by the class XContainerObject. To add objects to a container control. The most simple method (eg. for icon- or text-view) is: //create an object XContainerObject * obj = new XContainerObject(container); //give the object a title obj->SetTitle( "Object 1" ); //you may want to see it with an icon obj->SetIcon( &icon ); //add the object to the container container->AddObject( obj ); //continue like above for all objects to insert //finaly let the container show the objects container->InvalidateObject(); For container controls in tree view the shown method must be changed only at the Line AddObject(), here you often have to specify a parent object for the object to add: //first create the parent object, eg. the root of the tree XContainerObject * root = new XContainerObject(container); //create the next object XContainerObject * child = new XContainerObject(container); //add the second object as a child for the root container->AddObject( child, root ); //continue like above Container controls with detail view are more compilcated. At first you have to specify in the constructor how many columns are used so the library can allocate the needed memory: //we use four columns in this sample XContainerObject * obj = new XContainerObject(container, 4); Done so we have to set the data for each columnn: obj->SetColumnData( 0, "Column 1"); //data for the first column obj->SetColumnData( 1, "Column 2"); //data for the first column //and so on There are different overloads of SetColumnData() to set icons, text, dates etc as the column data. ═══ 2.3.4.2.5. Handling container events ═══ Comlex container events are caught with a XContainerHandler, handle them as described above. In the case of drag/drop or direct editing (the user edits the text of a container object) special event classes are used (XContainerDragEvent/XContainerEditEvent), in the method HandleEvent() of your class of XContainerHandler you can typecast (see online documentation). ═══ 2.3.4.2.6. Retrieving container objects ═══ To retrieve objects added to a container you can use the methods GetObject() and FindObject() from XContainerControl, the methods returns a pointer to XContainerObject (you can typecast if you know the class for shure). ═══ 2.4. Files and information about files ═══ The most important method to save and restore data is to use files. This chapter describes how to use files with the OOL. ═══ 2.4.1. Open a file ═══ To have read and/or write access to a file you have to open it with the method XFile::Open(). With the different parameters of Open() you can specify the access-mode and how the file is shared with other processes. To open a file for read-write mode and lock the file for other processes you would code: XFile file; ULONG returnCode; returnCode = file.Open( "c:\\config.sys", // the path of the file to open XFILE_FAIL_IF_NEW|XFILE_OPEN_EXISTING, // if the file does not exist, return XFILE_READWRITE, // read/write-access XFILE_SHARE_DENYREADWRITE ); // lock the file if( returnCode == 0) // ok, the file is open { // perform your read/write actions here } else // error ocured, see OS/2 online documentation { // for the meaning of returnCode } file.Close(); ═══ 2.4.2. Read/Write from/to a file ═══ To read/write data from/to a file the member functions Write() and Read() are avaible. This methods have multiple overloads for the different data classes like XString, XDate, XTime and for some "C"-data types like LONG, CHAR etc. Assuming we have opened a file for read/write mode we can code XDate date; date.GetCurrentDate(); file.Write( date ); // to read a date: file.Read( &date ); To read/write a XString it is a little more complicated becaus on default the terminating NULL of the string is not saved. A good way is to write/read strings in the "Pascal"-way if you use your own file format, that means you store the length of the string first, then the content of the string without terminating NULL: XString string; // here the length ist stored as a char so the string must // not be longer than 255 chars file.Write( (CHAR) string.GetLength()); file.Write( string ); // and now read that string: CHAR size; file.Read( &size ); file.Read( string, size ); If you need to save the terminating NULL you would code: XString string; file.Write( string, string.GetLength() + 1); ═══ 2.4.3. Information about files ═══ To get more information about a file or directory the class XFileInfo is used, you can use it  with the class XFileFind like described below  wih the static member function XFile::GetPathInfo()  if you have opend a file with the method XFile::GetFileInfo() With the method XFile::GetPathInfo() you simply code: XFileInfo fileInfo; XFile::GetPathInfo( "c:\\config.sys" ); To use XFile::GetFileInfo() you have to open the file first: XFileInfo fileInfo; XFile file; file.Open( "c:\\config.sys" ); file.GetFileInfo( &fileInfo ); ═══ 2.4.4. Finding files ═══ Often you need to find one or more files, eg. find all files with the suffix ".cpp". To find these files the class XFileFind is used: XFileFind fileFinder( "*.cpp" ); // we need two buffers to hold the informations XString fileName; XFileInfo fileInfo; // find all files while( fileFinder.Find( &fileName, &fileInfo)) { // perform here your actions with the found files // in the buffer "fileName" the name of the found file is avaible // in the buffer "fileInfo" further information about the found // file is avaible (like size, attributes etc) }; ═══ 2.5. Process classes and process-communication ═══ As described above XApplication is your main process class. It is created automaticaly when your program starts and is terminated and destroyed when your program ends. The class contains some service methods and the functions derived from XProcess. The following secton describes the other process related classes of the OOL: in the first part the usage of the thread class XThread will be discused, then signal classes for processes (semaphores) are following. Finaly the usage of classes for data exchange between processes is shown. ═══ 2.5.1. Threads ═══ One advantage of modern operating sytems is theire multitasking concept. To use this concept in an application you have to use threads (for a detailed discussion of threads see OS/2 developer online documentation). The OOL contains two tread-classes: 1. XPMThread 2. XThread The threads differ in theire usage, XThread is designed for a work which does not need access for windows or other graphical elements, a typical work for this class is handling pipes, files, sockets etc. XPMThread has full access to the window classes and can handle windows, receive messages etc. A very popular ... is to print within a thread: while the document is printed the user can work with the printing application and don't need to wait for the printer. The following example shows how this job can be done: class PrintThread: public XPMThread { public: PrintThread( ) { } void Init() { XPrinterDevice printer; //initiate the printer here .... //create here objects to print ..... printer.Draw(); printer->ClosePrinterJob( ); XMessageBox("document printed"); //ugly, but nessacary: delete this; } }; BOOL MyWindow::DoCommand( LONG command) { if(command == ID_PRINT) { PrintThread * pThread = new pThread(); p->Run(); } return TRUE; } As you see above the printing is done in the Init() - method of the thread class. This is the method (unlike the constructor of the thread class) where you have full control of the thread and where the class is executed as a single thread. The Init() - method is called automaticaly from the library, you must not call it yourself. The second section of the sample shows how to create and start a thread-class. There are two critical points: 1. The thread-instance must be created with the new() operator. If you would create the instance like PrintThread pThread; the destructor of the class would be called when the calling method is left. 2. The thread must be started with the member method Run(), if you don't call it the thread is never started. ═══ 2.5.2. Semaphores ═══ ═══ 2.5.3. Pipes ═══ ═══ 2.5.3.1. Named ═══ Pipes vs. Unnamed Pipes ═══ 2.5.3.2. Unnamed ═══ Pipes ═══ 2.5.3.3. Named ═══ Pipes ═══ 2.5.4. Sockets ═══ ═══ 2.5.5. DDE ═══ ═══ 2.6. Enhanced topics ═══ ═══ 2.6.1. Multimedia ═══ The OOL contains two classes for basic multimedia support:  XSound is a class to play WAV and MIDI files  XVideo can play digital videos (depending of which CODECs are installed)  XCDPlayer For all classes MMPM/2 must be installed (on Warp 4 it is always installed). To use the multimedia classes (see directory "sound" for sourcecode): 1. create an instance of the needed class 2. load a file 3. use the methods Play(), Stop() etc The methods to play a file are usualy derived from the class XMediaWindow, this methods send a notification code to the owning frame window when the action has finished, this notification codes can be caught in the method DoControl() of the frame window. E.g. if you have started to play a video in the DoCommand() method you recive an object of the type XControlEvent which has the ID MEDIA_PLAYED. You must make shure that a created multimedia-object is destroyed before your application is finished! ═══ 2.6.2. Using the OOL and other class librarys ═══ Objects of the OOL are tested with the Standard Template Library (STL). To use the data-objects XString, XDate and XTime with the STL the operators "<" and "==" and the copy-constructors are overwriten in these classes, you shouldnt have any problems to use this classes with sorted containers like set or bag (never, never put a window-object in a container!) ═══ 3. class index ═══ ATTENTION: not all variables and functions are documentated! If you are missing functions refer to the header files of the classes. ═══ 3.1. XApplication ═══ Overview Functions  GetApplication  GetResourceLibrary arguments  GetArgumentCount  GetArgumentValue  SetArguments constructors/destructors  ~XApplication initiate/terminate a process  Start  Terminate misc  SetExitHandler resources  SetResourceLibrary ═══ 3.1.1. XApplication overview ═══ Parent class: XProcess Overview XApplication initializes a stand-alone process and creates a XResourceLibrary with the resources which are linked to the exe-file. The XResourceLibrary can be accessed with GetResourceLibrary(). If youяve set up your mainwindow, call Start() to run the application. An instance of XApplication is created when your programm starts, it can be accessed with XApplication::GetApplication(). You must not create an instance of XApplication or a derived class. In your main-function you can create windows, dialog etc. Finished that you must call XApplication::Start() so your application starts to work Example int main(int argc, void ** argv) { //set the arguments for the case that they are used later XApplication::GetApplication()->SetArguments(argc, argv); //create a window //MyWindow * window = new MyWindow(); //go! XApplication::GetApplication()->Start(); } ═══ 3.1.2. XApplication::GetApplication ═══ Remarks Returns a pointer to the one and only application-object. Return-Value XApplication * ═══ 3.1.3. XApplication::GetResourceLibrary ═══ Remarks An application creates a resource library when the application is constructed out of the resources which are binded to the exe-file. GetResourceLibrary returns the pointer to this resource library. Return-Value XResourceLibrary * The XResourceLibrary the application created when it starts up ═══ 3.1.4. XApplication::GetArgumentCount ═══ Remarks Query the count of arguments that were set with SetArguments() Return-Value SHORT value ═══ 3.1.5. XApplication::GetArgumentValue ═══ Remarks Query an argument that was set with SetArguments() Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT │zero-based index │ ├────────────────────┼────────────────────────────────────────┤ │XString * │buffer for the data │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.1.6. XApplication::SetArguments ═══ Remarks Set the arguments which are received in the main-function. When they are set you can query them with GetArgumentCount()/GetArgumentValue(). Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT │Count of arguments given by main() │ ├────────────────────┼────────────────────────────────────────┤ │void** │Pointer to arguments given by main() │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.1.7. XApplication::~XApplication ═══ Remarks Destructs the application and the resource library. WARNING: to terminate an application, call Terminate(), never the destructor! ═══ 3.1.8. XApplication::Start ═══ Remarks After a XApplication is constructed und you have setup your code, call Start() to make the process work. ═══ 3.1.9. XApplication::Terminate ═══ Remarks With this method an application can be terminated. If you call Terminate() the method QueryForQuit() will be called. ═══ 3.1.10. XApplication::SetExitHandler ═══ Remarks Add an exit-handler to the application. The handlers method HandleEvent is called when the user wants a shutdown of the system. Parameters XExitHandler* the handler ═══ 3.1.11. XApplication::SetResourceLibrary ═══ Remarks Set a new XResourceLibrary as the actual library. All resources will be loaded from the new library (except you use a XResource for loading). Parameters XResourceLibrary * the new library Example XResourceLibrary * resourceLib; //we use for every languag a different library switch (language) { case GERMAN: resourceLib = new XResourceLibrary( "ger.dll" ); break; case ENGLISH: resourceLib = new XResourceLibrary( "eng.dll" ); break; default: throw XException(...); break; } //we set the resource-library a the actual library for the application, all resorces //will be loaded from this library XApplication::GetApplication()->SetResourceLibrary( resourceLib ); //create the window with the selected library MyAppWindow * window = new MyAppWindow(); . ═══ 3.2. XArc ═══ Overview Functions constructors/destructors  XArc ═══ 3.2.1. XArc overview ═══ Parent class: XLine Overview ═══ 3.2.2. XArc::XArc ═══ Remarks Construct an arc Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * p │point │ ├────────────────────┼────────────────────────────────────────┤ │SHORT width │width │ ├────────────────────┼────────────────────────────────────────┤ │SHORT startAngle │starting angle │ ├────────────────────┼────────────────────────────────────────┤ │SHORT endAngle │ending angle │ ├────────────────────┼────────────────────────────────────────┤ │BOOL fill │TRUE=fill circle, FALSE=donяt fill │ ├────────────────────┼────────────────────────────────────────┤ │ULONG height │if zero, height becomes width, otherwise│ │ │an elipse is drawn (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT x │x-offset (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT y │y-offset (default is zero) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.3. XBackgroundDrawEvent ═══ Overview Functions drawing  Draw ═══ 3.3.1. XBackgroundDrawEvent overview ═══ Parent class: XEvent Overview ═══ 3.3.2. XBackgroundDrawEvent::Draw ═══ Remarks Draws a bitmap Parameters XBitmap * bitmap bitmap to draw ═══ 3.4. XBitmap ═══ Overview Functions  Fill constructors/destructors  XBitmap loading a bitmap  GetImportFilterStruct  Load  LoadBMP  SetupImportFilter loading/saving a bitmap  GetFilteNames  GetFilterExtensions  ReleaseFilterStruct misc  Copy  GetDimensions  SetOutputSize saving a bitmap  GetExportFilterStruct  Save  SetupExportFilter ═══ 3.4.1. XBitmap overview ═══ Parent class: XGraphicObject Overview ═══ 3.4.2. XBitmap::Fill ═══ Remarks Does not work ═══ 3.4.3. XBitmap::XBitmap ═══ Remarks Construct a bitmap Construct a bitmap. Dont use this constructor for usage with a graphic device. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * p │left-lower corner │ ├────────────────────┼────────────────────────────────────────┤ │LONG mode │mode, default is ROP_SRCCOPY │ └────────────────────┴────────────────────────────────────────┘ XWindow * owner window to draw to Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.4.4. XBitmap::GetImportFilterStruct ═══ Remarks Returns the best matching import-filter for the file you specified. The structure returned is used a paramter for several OOLGLIB-functions. To setup the structure manually use the declarations found in oolglib.h. If this method is used, GBM.DLL and OLLRES.DLL must be in the LIBPATH. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * filename │filename of the file to load (later) │ │ │<\t> │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.5. XBitmap::Load ═══ Remarks Load a bitmap from a file. If this method is used, GBM.DLL and OLLGLIB.DLL must be in the LIBPATH. Due a bug (?) in OS/2-GPI you should specify params->cBitCount = BFP_BPP_TRUECOLOR if you want to modify or resave the bitmap. load a bitmap from a resource library Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileName │filename of the file to load │ ├────────────────────┼────────────────────────────────────────┤ │XBitmapFilter * │filetype specific filter informations. │ │params │An initialized structure has to be │ │ │created by XBitmap :: │ │ │GetImportFilterStruct () or │ │ │XGLibFileDialog. (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL releaseParams │filter informations will be released │ │ │after usages <\t> XResource * resource │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.6. XBitmap::LoadBMP ═══ Remarks Load a bitmap from a file. This method works faster than Load() but can only load bitmpas in OS2-BMP format Parameters char * fileName filename of the file to load Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.7. XBitmap::SetupImportFilter ═══ Remarks Opens an dialog which allows you to modify the parameters of bitmap-import-filters interactivly. If this method is used, GBM.DLL, OLLGLIB.DLL and OOLRES.DLL must be in the LIBPATH. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │owner of the dialog │ ├────────────────────┼────────────────────────────────────────┤ │char * filename │filename of the file to load (later) │ ├────────────────────┼────────────────────────────────────────┤ │XBitmapFilter * │filetype specific filter informations. │ │params │An initialized structure has to be │ │ │created by XBitmap :: │ │ │GetImportFilterStruct () or │ │ │XGLibFileDialog. (default is NULL) <\t>│ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.8. XBitmap::GetFilteNames ═══ Remarks Returns a NULL-terminated list of the names of all bitmap-formats supported by OOLGLIB. If this method is used, GBM.DLL and OOLGLIB.DLL must be in the LIBPATH. Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.4.9. XBitmap::GetFilterExtensions ═══ Remarks Returns a NULL-terminated list of the file-extensions of all bitmap-formats supported by OOLGLIB. If this method is used, GBM.DLL and OOLGLIB.DLL must be in the LIBPATH. Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.4.10. XBitmap::ReleaseFilterStruct ═══ Remarks Released bitmap-filters created by XBitmap :: GetImportFilter/GetExportFilter and XGLibFileDialog Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * filename │filename of the file to load (later) │ │ │<\t> │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.11. XBitmap::Copy ═══ Remarks copy the content of the bitmap to a graphic device Parameters ┌────────────────────┬────────────────────────────────────────┐ │XGraphicDevice * │target │ ├────────────────────┼────────────────────────────────────────┤ │XPoint * │point to copy to │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.4.12. XBitmap::GetDimensions ═══ Remarks Returns the dimensions Parameters XSize * size buffer to hold the size ═══ 3.4.13. XBitmap::SetOutputSize ═══ Remarks Set the size of the bitmap to draw. If it is diferent from it physical size, the bitmap will be stretched. Parameters XRect * rect new rect (only width and height will be used) ═══ 3.4.14. XBitmap::GetExportFilterStruct ═══ Remarks Returns the best matching export-filter for the file you specified. The structure returned is used a paramter for several OOLGLIB-functions. To setup the structure manually use the declarations found in oolglib.h. If this method is used, GBM.DLL and OLLRES.DLL must be in the LIBPATH. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * filename │filename of the file to load (later) │ │ │<\t> │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.15. XBitmap::Save ═══ Remarks Save a bitmap from a file. If this method is used, GBM.DLL and OLLGLIB.DLL must be in the LIBPATH. Due a bug (?) in OS/2-GPI the bitmap should be in 24-bit-format. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileName │filename of the file to load │ ├────────────────────┼────────────────────────────────────────┤ │XBitmapFilter * │filetype specific filter informations. │ │params │An initialized structure has to be │ │ │created by XBitmap :: │ │ │GetImportFilterStruct () or │ │ │XGLibFileDialog. (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL releaseParams │filter informations will be released │ │ │after usages <\t> │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.4.16. XBitmap::SetupExportFilter ═══ Remarks Opens an dialog which allows you to modify the parameters of bitmap-export-filters interactivly. If this method is used, GBM.DLL, OLLGLIB.DLL and OOLRES.DLL must be in the LIBPATH. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │owner of the dialog │ ├────────────────────┼────────────────────────────────────────┤ │char * filename │filename of the file to load (later) │ ├────────────────────┼────────────────────────────────────────┤ │XBitmapFilter * │filetype specific filter informations. │ │params │An initialized structure has to be │ │ │created by XBitmap :: │ │ │GetImportFilterStruct () or │ │ │XGLibFileDialog. (default is NULL) <\t>│ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails to create a new bitmap an exception of the type XException is thrown. ═══ 3.5. XBitmapFilter*XBitmap ═══ Overview Functions loading/saving a bitmap  GetFilter ═══ 3.5.1. XBitmapFilter*XBitmap overview ═══ ═══ 3.5.2. XBitmapFilter*XBitmap::GetFilter ═══ Remarks Returns the bitmap-filter created by the dialog behind the options-button. ═══ 3.6. XBox ═══ Overview Functions constructors/destructors  XBox ═══ 3.6.1. XBox overview ═══ Parent class: XLine Overview ═══ 3.6.2. XBox::XBox ═══ Remarks Construct a visible rectangle/box Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * p1 │left-lower corner │ ├────────────────────┼────────────────────────────────────────┤ │XPoint * p2 │right-upper corner │ ├────────────────────┼────────────────────────────────────────┤ │BOOL fill │TRUE=fill box, FALSE=donяt fill │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.7. XBubbleHelp ═══ Overview Functions constructors/destructors  XBubbleHelp misc  Enable text functions  SetMsgText  SetText ═══ 3.7.1. XBubbleHelp overview ═══ Parent class: XUserWindow Overview XBubbleHelp is a window which can display short help-messages, it looks like the bubbles on a mac. To use XBubbleHelp derive a class of it and override XBubbleHelp::SetMsgText(). See XBubbleHelp::AddWindow() and XBubbleHelp::XBubbleHelp() for details how to select windows to show help-messages for. For applications which use XBubbleHelp it is nessecary that the OOL-resourcelibrary OOLRES.DLL is in the libpath. The destructor is not called automaticaly when the window is hidden. XBubbleHelp does not work with menus! ═══ 3.7.2. XBubbleHelp::XBubbleHelp ═══ Remarks Construct a bubblehelp-window Parameters XWindow * The owner-window. ═══ 3.7.3. XBubbleHelp::Enable ═══ Remarks Enable/disable XBubbleHelp Parameters BOOL enable TRUE=enable, FALSE=disable (default is TRUE) ═══ 3.7.4. XBubbleHelp::SetMsgText ═══ Remarks Override this function to select the text to display with SetText() Parameters ULONG id the window-id from the window to display a helptext for Return-Value BOOL TRUE=show the bubble, FALSE=dont display the bubble ═══ 3.7.5. XBubbleHelp::SetText ═══ Remarks Set the text to display Parameters char * theText ═══ 3.8. XButton ═══ Overview ═══ 3.8.1. XButton overview ═══ Parent class: XControl Overview ═══ 3.9. XCDPlayer ═══ Overview Functions constructors/destructors  XCDPlayer misc  GetRecordLength  PlayRecord  ReadRecordList ═══ 3.9.1. XCDPlayer overview ═══ Parent class: XMediaWindow Overview ═══ 3.9.2. XCDPlayer::XCDPlayer ═══ Remarks Opens the CD-Player. To play a record from the CD you must call ReadRecordList() first, then call PlayRecord()! Parameters XFrameWindow* owning window Exceptions If an error ocures an exception of the type XException is thrown ═══ 3.9.3. XCDPlayer::GetRecordLength ═══ Remarks Get the length of a record Parameters USHORT zero based index Return-Value ULONG time in milliseconds ═══ 3.9.4. XCDPlayer::PlayRecord ═══ Remarks Plays a record Parameters USHORT zero based index Return-Value ULONG errorcode ═══ 3.9.5. XCDPlayer::ReadRecordList ═══ Remarks Load the list of records on the current CD. Exceptions If an error ocures an exception of the type XException is thrown ═══ 3.10. XCheckBox ═══ Overview Functions constructors/destructors  XCheckBox ═══ 3.10.1. XCheckBox overview ═══ Parent class: XSettingButton Overview ═══ 3.10.2. XCheckBox::XCheckBox ═══ Remarks Constructs a XCheckBox Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │the style │ ├────────────────────┼────────────────────────────────────────┤ │const char * string │text to display │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.11. XCircle ═══ Overview Functions constructors/destructors  XCircle ═══ 3.11.1. XCircle overview ═══ Parent class: XLine Overview ═══ 3.11.2. XCircle::XCircle ═══ Remarks Construct a circle Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * point │point │ ├────────────────────┼────────────────────────────────────────┤ │ULONG width │width │ ├────────────────────┼────────────────────────────────────────┤ │BOOL fill │TRUE=fill circle, FALSE=donяt fill │ ├────────────────────┼────────────────────────────────────────┤ │ULONG height │if zero, height becomes width, otherwise│ │ │an elipse is drawn (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT x │x-offset (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT y │y-offset (default is zero) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.12. XCircularSlider ═══ Overview Functions constructors/destructors  XCircularSlider limits  GetLimits  SetLimits misc  GetIncremets  SetIncrements set/get value  GetValue  SetValue ═══ 3.12.1. XCircularSlider overview ═══ Parent class: XControl Overview ═══ 3.12.2. XCircularSlider::XCircularSlider ═══ Remarks Constructs a XCircularSlider. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the XCircularSlider │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: CS_NOBUTTON │ │ │CS_NOTEXT CS_NONUMBER CS_POINTSELECT │ │ │CS_360 CS_MIDPOINT CS_PROPORTIONALTICKS │ │ │CS_NOTICKS CS_CIRCULARVALUE │ │ │(can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use (e.g. "8.Helv") │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.12.3. XCircularSlider::GetLimits ═══ Remarks Query the limits set to the circular slider Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT& │lowerLimit │ ├────────────────────┼────────────────────────────────────────┤ │SHORT& │upperLimit │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.12.4. XCircularSlider::SetLimits ═══ Remarks Set limits Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG │lowerLimit │ ├────────────────────┼────────────────────────────────────────┤ │LONG │upperLimit │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL result ═══ 3.12.5. XCircularSlider::GetIncremets ═══ Remarks Query the increments set to the slider Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT& │scrollIncrement │ ├────────────────────┼────────────────────────────────────────┤ │SHORT& │tickIncrement │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.12.6. XCircularSlider::SetIncrements ═══ Remarks Set ticks and steps Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │ticks │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │steps │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL result ═══ 3.12.7. XCircularSlider::GetValue ═══ Remarks Return the current value Return-Value SHORT theValue ═══ 3.12.8. XCircularSlider::SetValue ═══ Remarks Set a new value Parameters LONG value Return-Value BOOL result ═══ 3.13. XClientSocket ═══ Overview Functions Misc  Connect ═══ 3.13.1. XClientSocket overview ═══ Parent class: XSocket Overview ═══ 3.13.2. XClientSocket::Connect ═══ Remarks Requests a connection to a remote host; throws an exception in case of an error. ═══ 3.14. XClipBoard ═══ Overview Functions constructor/destructor  ~XClipBoard constructors/destructors  XClipBoard get data  GetBitmap  GetData  GetText misc  IsFormatAvaible set data  SetBitmap  SetData  SetText ═══ 3.14.1. XClipBoard overview ═══ Parent class: XObject Overview ═══ 3.14.2. XClipBoard::~XClipBoard ═══ Remarks Never forget to close the clipboard by calling the destructor! ═══ 3.14.3. XClipBoard::XClipBoard ═══ Remarks Open the clipboard ═══ 3.14.4. XClipBoard::GetBitmap ═══ Remarks Get a bitmap from the clipboard Parameters XBitmap * buffer to hold the data Return-Value TRUE success ═══ 3.14.5. XClipBoard::GetData ═══ Remarks Get data in a application defined format to the clipboard Parameters const XAtom&atom which describes the format of the data Return-Value void * pointer to the data (NULL if no data avaible) ═══ 3.14.6. XClipBoard::GetText ═══ Remarks Get the text in the clipboard Parameters XString * buffer to hold the data Return-Value BOOL success ═══ 3.14.7. XClipBoard::IsFormatAvaible ═══ Remarks Query if a specific format is avaible Parameters ULONG format of interest (see OS/2 documentation) Return-Value BOOL ═══ 3.14.8. XClipBoard::SetBitmap ═══ Remarks Set a bitmap to the clipboard Parameters XBitmap * the bitmap Return-Value BOOL success ═══ 3.14.9. XClipBoard::SetData ═══ Remarks Set data in a application defined format to the clipboard Parameters ┌────────────────────┬────────────────────────────────────────┐ │void* │pointer to shared memory which contains │ │ │the data │ ├────────────────────┼────────────────────────────────────────┤ │const XAtom& │atom which identifies the format of the │ │ │data │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.14.10. XClipBoard::SetText ═══ Remarks Set text to the clipboard Parameters ┌────────────────────┬────────────────────────────────────────┐ │char* │theText │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │length of the text (default is 0) │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.15. XColor ═══ Overview Functions constructors/destructors  XColor ═══ 3.15.1. XColor overview ═══ Overview XColor represents colors in RGB format. ═══ 3.15.2. XColor::XColor ═══ Remarks The constructor of XColor. Parameters LONG theColor The color to initialize. Valid values are: ┌────────────────────────────────────────┐ │COL_BLACK │ ├────────────────────────────────────────┤ │COL_BLUE │ ├────────────────────────────────────────┤ │COL_RED │ ├────────────────────────────────────────┤ │COL_PINK │ ├────────────────────────────────────────┤ │COL_GREEN │ ├────────────────────────────────────────┤ │COL_CYAN │ ├────────────────────────────────────────┤ │COL_YELLOW │ ├────────────────────────────────────────┤ │COL_BROWN │ ├────────────────────────────────────────┤ │COL_DARKGRAY │ ├────────────────────────────────────────┤ │COL_DARKBLUE │ ├────────────────────────────────────────┤ │COL_DARKRED │ ├────────────────────────────────────────┤ │COL_DARKPINK │ ├────────────────────────────────────────┤ │COL_DARKGREEN │ ├────────────────────────────────────────┤ │COL_DARKCYAN │ ├────────────────────────────────────────┤ │COL_PALEGRAY │ ├────────────────────────────────────────┤ │COL_WHITE │ ├────────────────────────────────────────┤ │other: color in RGB-format, forth byte │ │is ignored │ └────────────────────────────────────────┘ ═══ 3.16. XComboBox ═══ Overview Functions clipboard functions  GetSel constructors/destructors  XComboBox misc  EnableOverWrite  GetFirstChar  HasChanged  Hilite  IsListShowing  IsReadOnly  SetLimit  SetReadOnly  ShowList ═══ 3.16.1. XComboBox overview ═══ Parent class: XListBox Overview ═══ 3.16.2. XComboBox::GetSel ═══ Remarks Get the boundarys of the current selection. Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT& │starting point of selection │ ├────────────────────┼────────────────────────────────────────┤ │SHORT& │end point │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.16.3. XComboBox::XComboBox ═══ Remarks Construct a combobox Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * theOwner │The owning window. │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rectangle │Position and size of the combobox. You │ │ │must specify the size the combobox │ │ │should have when the listbox is shown! │ ├────────────────────┼────────────────────────────────────────┤ │USHORT ID │The ID of the combobox. Default is │ │ │zero. │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │The style of the window. Valid values │ │ │are: CB_SIMPLE listbox is always │ │ │shown, the user can enter text │ │ │CB_DROPDOWN listbox is activated with │ │ │special button, the user can enter text│ │ │CB_DROPDOWNLIST listbox is activated │ │ │with special button, the user cannot │ │ │enter text Default is CB_DROPDOWN. │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use, e.g. "8.Helvetica" │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.16.4. XComboBox::EnableOverWrite ═══ Remarks Enables/disables overwrite-mode. Parameters BOOL overwrite TRUE=overWrite, FALSE=disable overWrite ═══ 3.16.5. XComboBox::GetFirstChar ═══ Remarks Get the index of the first fisible charakter. Return-Value SHORT index ═══ 3.16.6. XComboBox::HasChanged ═══ Remarks Get if the content has changed. Return-Value BOOL result ═══ 3.16.7. XComboBox::Hilite ═══ Remarks Enable/disable hiliting. Parameters BOOL hilite TRUE=enable, FALSE=disable hiliting ═══ 3.16.8. XComboBox::IsListShowing ═══ Remarks Get if the list is displayed. Return-Value BOOL result ═══ 3.16.9. XComboBox::IsReadOnly ═══ Remarks Query if the entryfild is in readonly-mode. Return-Value BOOL result ═══ 3.16.10. XComboBox::SetLimit ═══ Remarks Set maximum number of charakters. Parameters USHORT length maximum size ═══ 3.16.11. XComboBox::SetReadOnly ═══ Remarks Enable/disable readonly-mode. Parameters BOOL readOnly TRUE=enable, FALSE=disable readonly-mose ═══ 3.16.12. XComboBox::ShowList ═══ Remarks Show/hide the list of the combo. Parameters BOOL show TRUE=show, FALSE=hide the list ═══ 3.17. XContainerColumn ═══ Overview Functions constructors/destructors  XContainerColumn data  GetDataAttributes  SetDataAttributes misc  GetColumnNumber  GetNextColumn  TitleEdited title  GetTitle  GetTitleAttributes  SetTitle  SetTitleAttributes ═══ 3.17.1. XContainerColumn overview ═══ Parent class: XObject Overview ═══ 3.17.2. XContainerColumn::XContainerColumn ═══ Remarks If a container should be displayed in detail-mode you must add columns to it. Therfore you construct one or more XContainerColums, add these with XContainerControll::AddColumn and finaly call XContainerControll::UpdateColumns. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerControl * │the owner of the column │ ├────────────────────┼────────────────────────────────────────┤ │void * │the title of the column, the parameter │ │ │can be a pointer to a string or contain│ │ │a handle for a bitmap or icon │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │a zero-based index which points to the │ │ │data-column which will be used in │ │ │XContainerObject::SetColumnData() │ ├────────────────────┼────────────────────────────────────────┤ │LONG │Information about the datas in the │ │ │column │ │ │COL_LEFT field is left-justified │ │ │COL_RIGHT field is right-justified │ │ │COL_CENTER field is horizontal centered │ │ │COL_TOP field is top-justified │ │ │COL_VCENTER field is vertictal centered │ │ │COL_BOTTOM field is bottom-justified │ │ │COL_INVISIBLE the column is invisible │ │ │COL_SEPARATOR vertical separator │ │ │COL_HORZSEPARATOR horizontal separator │ │ │COL_BITMAPORICON the data contain a │ │ │handle to a bitmap/icon │ │ │COL_STRING the data contain a string │ │ │COL_DATE the data contain a date │ │ │COL_TIME the data contain a time-value │ │ │COL_ULONG the data contain a ULONG value│ │ │COL_FIREADONLY datas are readonly │ │ │Can be or-ed; │ ├────────────────────┼────────────────────────────────────────┤ │LONG titleSettings │Information about the title of the │ │ │column │ │ │COL_LEFT title is left-justified │ │ │COL_RIGHT title is right-justified │ │ │COL_CENTER title is horizontal centered │ │ │COL_TOP title is top-justified │ │ │COL_VCENTER title is vertictal centered │ │ │COL_BOTTOM title is bottom-justified │ │ │COL_SEPARATOR vertical separator │ │ │COL_HORZSEPARATOR horizontal separator │ │ │COL_BITMAPORICON the title contain is a │ │ │bitmap/icon │ │ │COL_FTITLEREADONLY title is readonly │ │ │Can be or-ed; │ ├────────────────────┼────────────────────────────────────────┤ │LONG widthOfColumn │the width of the column in window-pixel.│ │ │If zero the width of the column is set │ │ │dynamicaly. │ │ │ Default is zero. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.17.3. XContainerColumn::GetDataAttributes ═══ Remarks Query attributes for the datas Return-Value LONG attruibute (see constructor for details) ═══ 3.17.4. XContainerColumn::SetDataAttributes ═══ Remarks Set attributes for the datas Parameters LONG attruibute (see constructor for details) ═══ 3.17.5. XContainerColumn::GetColumnNumber ═══ Remarks Returns the number of the column in the container Return-Value SHORT number ═══ 3.17.6. XContainerColumn::GetNextColumn ═══ Remarks Returns a pointer to the next column of the container Return-Value XContainerColumn * column ═══ 3.17.7. XContainerColumn::TitleEdited ═══ Remarks This method is called if the user has edited the title of the column. Overwrite this method if you need the information Parameters char * the new Title ═══ 3.17.8. XContainerColumn::GetTitle ═══ Remarks Query the title of a column Parameters XString * buffer buffer to hold the data ═══ 3.17.9. XContainerColumn::GetTitleAttributes ═══ Remarks Query attributes for the title Return-Value LONG attruibute (see constructor for details) ═══ 3.17.10. XContainerColumn::SetTitle ═══ Remarks Set the title Set the title Set the title Parameters XIcon * bitmap for the title (tilt-attributes must have COL_BITMAPORICON) XBitmap * bitmap for the title (tilt-attributes must have COL_BITMAPORICON) char * title ═══ 3.17.11. XContainerColumn::SetTitleAttributes ═══ Remarks Set attributes for the title Parameters LONG attruibute (see constructor for details) ═══ 3.18. XContainerControl ═══ Overview Functions columns  GetColumn  InsertColumn  RemoveColumn  UpdateColumns constructors/destructors  XContainerControl direct editing  BeginEdit display  Arrange  HScroll  InvalidateObject  VScroll expanding  ExpandTreeObject info  GetInfo  SetInfo inserting/removing objects  AddObject  AddObjectList  RemoveAll  RemoveObject  RemoveObjectList misc  SortObjects  TitleEdited object settings  SetObjectEmphasis searching  FindObject  GetObject ═══ 3.18.1. XContainerControl overview ═══ Parent class: XControl Overview XContainerControl represents a container with multiple views like tree-, list- or icon view for a large amount of objects. ═══ 3.18.2. XContainerControl::GetColumn ═══ Remarks Query a column from a container. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerColumn * │Relative position to begin search. In │ │ │cases CMA_FIRST and CMA_LAST ignored. │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │Valid values are: │ │ │CON_FIRST Get the first column. │ │ │CON_LAST Get the last column. │ │ │CON_NEXT Get the next relative to │ │ │theColumnToSearch. │ │ │CON_PREV Get the previous relative to │ │ │theColumnToSearch. │ └────────────────────┴────────────────────────────────────────┘ Return-Value XContainerControl * The found column. ═══ 3.18.3. XContainerControl::InsertColumn ═══ Remarks Insert a column into a container. After you have added one or more columns, you must call Invalidate() so the columns are drawn. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerColumn * │This column should be inserted │ ├────────────────────┼────────────────────────────────────────┤ │XContainerColumn * │The position to insert. Valid values │ │ │are: │ │ │CON_FIRST Insert as the first column. │ │ │CON_LAST Insert as the last column. │ │ │XContainerColumn* │ ├────────────────────┼────────────────────────────────────────┤ │The column behind │ │ │which the column │ │ │should be inserted. │ │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.4. XContainerControl::RemoveColumn ═══ Remarks Removes a column Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerColumn * │The column to delete │ │theColumn │ │ ├────────────────────┼────────────────────────────────────────┤ │SHORT option │How to delete. Valid values are: │ │ │CON_FREE Destruct the column and free │ │ │container related memory │ │ │CON_INVALIDATE Redraw the container │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.5. XContainerControl::UpdateColumns ═══ Remarks Update columns in detail-view. If you have inserted, deleted or modified one ore more columns you must call UpdateColumns to make your changes visible. ═══ 3.18.6. XContainerControl::XContainerControl ═══ Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * theOwner │The owning window. │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rectangle │Position and size. │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │The id of the window. Default is zero. │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │The style. Valid values are (additonaly │ │ │to the XWindow styles): │ │ │CON_AUTOPOSITION objects are arranged │ │ │automaticaly │ │ │CON_EXTENDSEL extended selection is │ │ │enabled │ │ │CON_MULTIPLESEL mutiple selection is │ │ │enabled │ │ │CON_READONLY directe diting is disabled │ │ │CON_SINGLESEL only one object can be │ │ │selected │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.18.7. XContainerControl::BeginEdit ═══ Remarks Opens the window for direct editing Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │The object to edit. If the title of the │ │ │container or the title of a column │ │ │should be edited, this parameters must │ │ │be NULL. │ ├────────────────────┼────────────────────────────────────────┤ │XContainerColumn * │If not in detail-view, this parameter │ │ │must be NULL. In detail-view this │ │ │parameter is a pointer to the column in │ │ │which data should be edited or a │ │ │pointer to the column which title should│ │ │be edited. │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │If not in detail view, this parameters │ │ │should be zero if the title of an │ │ │object should be edited. If the │ │ │container title is to edit use │ │ │CID_CNRTITLEWND. │ │ │ In detail-view: │ │ │CID_CNRTITLEWND to edit the tilte of the│ │ │container │ │ │CID_LEFTCOLTITLEWND to edit the tilte of│ │ │a column │ │ │CID_LEFTDVWND to edit an oject │ │ │If the container is split, you may use │ │ │CID_RIGHTDVWND and CID_RIGHTCOLTITLEWND │ │ │instead. │ └────────────────────┴────────────────────────────────────────┘ Return-Value TRUE success ═══ 3.18.8. XContainerControl::Arrange ═══ Remarks Rearrange the object is the container ═══ 3.18.9. XContainerControl::HScroll ═══ Remarks Scrolls the container content horizontal Parameters LONG how much pixels to scroll ═══ 3.18.10. XContainerControl::InvalidateObject ═══ Remarks Invalidates one ore all objects Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │the object to invalidate (default is │ │ │NULL) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │options, valid values are: │ │ │CON_ERASE erase the background │ │ │CON_REPOSITION reposition │ │ │CON_NOREPOSITION no reposition │ │ │CON_TEXTCHANGED redraw the text │ │ │(default is CON_REPOSITION, can be │ │ │or-ed) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.18.11. XContainerControl::VScroll ═══ Remarks Scrolls the container content vertical Parameters LONG how much pixels to scroll ═══ 3.18.12. XContainerControl::ExpandTreeObject ═══ Remarks Expands/collaps an object in tree-view. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │the object to expand/collaps │ │obj │ │ ├────────────────────┼────────────────────────────────────────┤ │BOOL expand │TRUE=expand │ │ │FALSE=collapse │ └────────────────────┴────────────────────────────────────────┘ Return-Value TRUE success ═══ 3.18.13. XContainerControl::GetInfo ═══ Remarks Querys information about the container. Parameters XContainerInfo * buffer to hold the information (See the description of XContainerInfo ) ═══ 3.18.14. XContainerControl::SetInfo ═══ Remarks Set information how to display the container. Parameters XContainerInfo * See the description of XContainerInfo ═══ 3.18.15. XContainerControl::AddObject ═══ Remarks Add an object to the container. If you insert a large amount of objects you should set parameter to FALSE and call InvalidateObject(NULL) if you have finished inserting. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │object to add │ ├────────────────────┼────────────────────────────────────────┤ │XContainerObject * │parent of the object (for tree-view), │ │ │default is NULL │ ├────────────────────┼────────────────────────────────────────┤ │XContainerObject * │sibling object to insert behind, or: │ │ │CON_FIRST insert at the top │ │ │CON_END insert at the end │ │ │In this cases you have to make a │ │ │typecast: (XContainerObject *), default │ │ │is CON_END │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │redraw the object │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.16. XContainerControl::AddObjectList ═══ Remarks Add an object to the container. If you insert a large amount of objects you should set parameter to FALSE and call InvalidateObject(NULL) if you have finished inserting. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject ** │an array of pointer to objects to add │ │theObject │ │ ├────────────────────┼────────────────────────────────────────┤ │SHORT count │count of object in the array │ ├────────────────────┼────────────────────────────────────────┤ │XContainerObject * │parent of the objects (for tree-view) │ │parentObject │(default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │XContainerObject * │sibling object to insert behind, or: │ │sibObject │CON_FIRST insert at the top │ │ │CON_END insert at the end │ │ │In this cases you have to make a │ │ │typecast: (XContainerObject *), default │ │ │is CON_END │ ├────────────────────┼────────────────────────────────────────┤ │BOOL redraw │draw the objects │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.17. XContainerControl::RemoveAll ═══ Remarks Remove all objects from a container Parameters BOOL destroy objects, the destructors of the objects are called and memory ascociated with the container is freed. ═══ 3.18.18. XContainerControl::RemoveObject ═══ Remarks Removes an object from the container Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │the object to remove │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │if TRUE the destructor of the object is │ │ │called if FALSE it exist (usefull if an│ │ │object is member of multiple │ │ │container-controls) (default is TRUE) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │redraw the container (default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.19. XContainerControl::RemoveObjectList ═══ Remarks Removes an array of objects from the container Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject ** │an array of pointer to objects to remove│ ├────────────────────┼────────────────────────────────────────┤ │SHORT │the count of object in the array │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │if TRUE the destructor of the objects │ │ │are called if FALSE it exist (usefull │ │ │if an object is member of multiple │ │ │container-controls) (default is TRUE) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │redraw the container (default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.18.20. XContainerControl::SortObjects ═══ Remarks Sort the objects in the container. On default the objects are sorted by the title of the object. To sort them on a user-defined way you must override the method Sort() of the XContainerObject. ═══ 3.18.21. XContainerControl::TitleEdited ═══ Remarks This method is called if the user has edited the title of the container. Overwrite this method if you need the information Parameters char * the new Title ═══ 3.18.22. XContainerControl::SetObjectEmphasis ═══ Remarks Sets the emphasis of an object so displaying the objects icon is changed Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │object to change │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │the needed emphasis, valid values are: │ │ │CON_CURSORED the object is cursored │ │ │CON_DISABLED the object is disabled │ │ │CON_INUSE the objects icon is displayed │ │ │open │ │ │CON_PICKED the objects icon is displayed│ │ │dragged │ │ │CON_SELECTED the object is selected │ │ │CON_SOURCE the object get │ │ │source-emphasis │ │ │(can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │enable/disable emphasis │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.18.23. XContainerControl::FindObject ═══ Remarks Get an object from the container with relative positions Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │search relative to this object (default │ │startObject │is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT select │serach settings, valid values are: │ │ │CON_FIRST get the first object of the │ │ │container │ │ │CON_FIRSTCHILD get the first child of │ │ │startObject │ │ │CON_LAST get the last object of the │ │ │container │ │ │CON_LASTCHILD get the last child of │ │ │startObject │ │ │CON_NEXT get the next object relative to│ │ │startObject │ │ │CON_PARENT get the parent of startObject│ │ │CON_PREV get the previous object │ │ │relative to startObject │ │ │default is CON_FIRST │ └────────────────────┴────────────────────────────────────────┘ Return-Value XContainerObject * pointer to the found object (NULL if nothing is found) ═══ 3.18.24. XContainerControl::GetObject ═══ Remarks Get an object from the container by querying the objects emphasis Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerObject * │start-object, search relative to this │ │ │object (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │the emphasis to search │ │ │CON_CURSORED the object has the cursored│ │ │CON_DISABLED the object is disabled │ │ │CON_INUSE the objects icon is displayed │ │ │open │ │ │CON_PICKED the objects icon is displayed│ │ │dragged │ │ │CON_SELECTED the object is selected │ │ │CON_SOURCE the object get │ │ │source-emphasis │ │ │(default is CON_SELECTED, can be or-ed) │ └────────────────────┴────────────────────────────────────────┘ Return-Value XContainerObject * pointer to the found object (NULL if nothing is found) ═══ 3.19. XContainerDragEvent ═══ Overview ═══ 3.19.1. XContainerDragEvent overview ═══ Parent class: XContainerEvent Overview Drag/drop events in a container generate a XContainerDragEvent which is derived from XContainerEvent and has the same functionality like XDragEvent (see there for further information). ═══ 3.20. XContainerEditEvent ═══ Overview Functions  GetColumn  GetObject  GetText ═══ 3.20.1. XContainerEditEvent overview ═══ Parent class: XContainerEvent Overview An XContainerEditEvent is catched with a XContainerHandler. This event occures if the user edit the text of a container-item. ═══ 3.20.2. XContainerEditEvent::GetColumn ═══ Remarks Returns a pointer to that column in which an item is edited; Return-Value XContainerColumn * theColumn ═══ 3.20.3. XContainerEditEvent::GetObject ═══ Remarks Returns a pointer to the object which is edited; Return-Value XContainerObject * theObject ═══ 3.20.4. XContainerEditEvent::GetText ═══ Remarks Returns the text of an edited item. On CON_REALLOC the old text is returned, on CON_ENDEDIT the new text is avaible. Parameters XString * buffer buffer to hold the data ═══ 3.21. XContainerEvent ═══ Overview Functions  GetObject ═══ 3.21.1. XContainerEvent overview ═══ Parent class: XControlEvent Overview Events in a container generate a XContainerEvent, if you want to catch these events you must generate a XContainerHandler. Possible event-IDs are: ┌────────────────────┬────────────────────────────────────────┐ │CON_BEGINEDIT │the user start to edit a field │ ├────────────────────┼────────────────────────────────────────┤ │CON_COLLAPSTREE │in tree-view the tree or a part of it is│ │ │collapsed │ ├────────────────────┼────────────────────────────────────────┤ │CON_CONTEXTMENU │a context-menu is requested │ ├────────────────────┼────────────────────────────────────────┤ │CON_DRAGOVER │one or more objects fly over the │ │ │container │ ├────────────────────┼────────────────────────────────────────┤ │CON_DROP │one or more objects are dropped │ ├────────────────────┼────────────────────────────────────────┤ │CON_EMPHASIS │the emphasis of an item has changed │ ├────────────────────┼────────────────────────────────────────┤ │CON_ENTER │ENTER was pressed or a double-click with│ │ │the mouse occured │ ├────────────────────┼────────────────────────────────────────┤ │CON_EXPANDTREE │in tree-view the tree or a part of it is│ │ │expanded │ ├────────────────────┼────────────────────────────────────────┤ │CON_INITDRAG │a drag-operation is requested │ ├────────────────────┼────────────────────────────────────────┤ │CON_PAINTBACKGOUND │the background of the container must be │ │ │redrawn │ └────────────────────┴────────────────────────────────────────┘ which you can get with XEvent::GetEventID(). In the cases of CON_BEGINEDIT, CON_ENDEDIT and CON_REALLOC a event of the Type XContainerEditEvent is posted, in the case od CON_DROP and CON_DRAGOVER a XContainerDragEvent is posted, you can simple typecast to them. ═══ 3.21.2. XContainerEvent::GetObject ═══ Remarks Query the object which belongs to the event. Returns the object which posted the event Return-Value XContainerObject * theObject XContainerObject * the Object (can be NULL) ═══ 3.22. XContainerHandler ═══ Overview Functions  XContainerHandler ═══ 3.22.1. XContainerHandler overview ═══ Parent class: XHandler Overview To catch events from a container you need to derive a class from XContainerHandler and override the method HandleEvent where you will get the events. In the case of drag-events XContainerDragEvent is posted, in the case of edit-events XContainerEditEvent is posted, in the method HandleEvent you can typecast in this case, see XContainerEvent for details. ═══ 3.22.2. XContainerHandler::XContainerHandler ═══ Parameters XContainerControl * window The window to handle the events for. ═══ 3.23. XContainerInfo ═══ Overview Functions constructors/destructors  XContainerInfo misc  EnableSorting  GetBitmapSize  GetObjectCount  SetBitmapSize  SetCollapsedBitmap  SetExpandedBitmap  SetSpacing  SetTreeBitmapSize  SetTreeLineSpacing  SetTreeLineWidth set/query attributes  EnableBackgroundPainting  IsBackgroundPaintingEnabled  SetAttributes set/query container title  GetAttributes  GetTitle  SetTitle splitbar  GetSplitbarPos  SetSplitbarColumn  SetSplitbarPos ═══ 3.23.1. XContainerInfo overview ═══ Overview XContainerInfo is a class to set/query general attributes for a XContainerControl. To make changes to the settings: 1. query the current setting via XContainerControl::GetInfo() 2. make the changes in the used instance of XContainerInfo 3. call XContainerControl::SetInfo() with the used instance of XContainerInfo ═══ 3.23.2. XContainerInfo::XContainerInfo ═══ Remarks Constructor of XContainerInfo Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * theTitle │The title of the container. Default is │ │ │empty. │ ├────────────────────┼────────────────────────────────────────┤ │LONG theStyle │style of the container. Valid styles │ │ │are: │ │ │CO_TEXT the container is in text-mode │ │ │CO_NAME the container is in name-mode │ │ │CO_ICON the container is in icon-mode │ │ │CO_DETAIL the container is in │ │ │detail-mode │ │ │CO_FLOW arrange objects dynamicaly (text│ │ │and name mode only) │ │ │CO_MINI the container use small icons │ │ │CO_TREE the container is in tree-mode │ │ │CO_OWNERPAINTBACKGROUND the owner will │ │ │draw the background see │ │ │XBackgroundDrawEvent and │ │ │XBackgroundDrawHandler) │ │ │CO_TREELINE draw the tree-line in │ │ │tree-mode │ │ │CO_DRAWBITMAP draw icons │ │ │CO_DRAWICON draw bitmaps │ │ │CO_TITLE show the container-title │ │ │CO_TITLELEFT title is left-justified │ │ │CO_TITLERIGHT title is right-justified │ │ │CO_TITLECENTER title is centered │ │ │CO_TITLESEPARATOR the title is drawn │ │ │with a separator │ │ │CO_TITLEREADONLY the title cannot been │ │ │edited by the user │ │ │CO_DETAILTITLES in detail-mode the │ │ │titles of XContainerColumn are shown │ │ │The attributes can be or-ed, default is │ │ │CO_ICON. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.23.3. XContainerInfo::EnableSorting ═══ Remarks Enables sorting records when they are inserted. Parameters BOOL sort, set TRUE if the container items should be sorted when they are inserted. Therefor you must override the method XContainerObject::Sort(). Default is TRUE. ═══ 3.23.4. XContainerInfo::GetBitmapSize ═══ Remarks Query the size of bitmaps/icons Parameters XSize * size buffer to hold the size ═══ 3.23.5. XContainerInfo::GetObjectCount ═══ Remarks Query the count of objects in the container. Return-Value LONG objectCount ═══ 3.23.6. XContainerInfo::SetBitmapSize ═══ Remarks Set the size of bitmaps/icons Parameters XSize * size ═══ 3.23.7. XContainerInfo::SetCollapsedBitmap ═══ Remarks Replace the collapsed-icon. Replace the collapsed-bitmap. Parameters XIcon * the new icon XBitmap * the new bitmap ═══ 3.23.8. XContainerInfo::SetExpandedBitmap ═══ Remarks Replace the expanded-icon. Replace the expanded-bitmap. Parameters XIcon * the new icon XBitmap * the new bitmap ═══ 3.23.9. XContainerInfo::SetSpacing ═══ Remarks Set the vertical spacing between two objects. Parameters SHORT spacing (in pixels) ═══ 3.23.10. XContainerInfo::SetTreeBitmapSize ═══ Remarks Set the size of the expanded and collapsed bitmaps/icons in tree-view Parameters XSize * size ═══ 3.23.11. XContainerInfo::SetTreeLineSpacing ═══ Remarks Set the horizontal spacing between two levels in tree-view. Parameters SHORT width (in pixels) ═══ 3.23.12. XContainerInfo::SetTreeLineWidth ═══ Remarks Set the width of the trees line in tree-view. Parameters SHORT width (in pixels) ═══ 3.23.13. XContainerInfo::EnableBackgroundPainting ═══ Remarks Enable/disable background drawing by the application. To draw the background you must install a XBackgroundDrawHandler Parameters BOOL enable, TRUE=enable, FALSE=disable ═══ 3.23.14. XContainerInfo::IsBackgroundPaintingEnabled ═══ Remarks Query if owner-draw for the background is enabled or not. Return-Value BOOL result ═══ 3.23.15. XContainerInfo::SetAttributes ═══ Remarks Specify here how the container should be displayed. After you have set up the XContainerInfo use XContainerColumn::SetInfo() Parameters LONG attributes how the container should be displayed ( see XContainerInfo() ) ═══ 3.23.16. XContainerInfo::GetAttributes ═══ Remarks Query the attributes of the container. Return-Value LONG the attributes which are set for the container (can be or-ed). See XContainerInfo() ═══ 3.23.17. XContainerInfo::GetTitle ═══ Remarks Query the containers title Parameters XString * buffer ═══ 3.23.18. XContainerInfo::SetTitle ═══ Remarks Set the title of the container. Parameters char * theTitle ═══ 3.23.19. XContainerInfo::GetSplitbarPos ═══ Remarks Query the position of the splitbar of a container. Return-Value LONG the position in window-pixels ═══ 3.23.20. XContainerInfo::SetSplitbarColumn ═══ Remarks Set a splitbar in a container. Parameters XContainerColumn * the XContainerColumn after that the splitbar will be displayed ═══ 3.23.21. XContainerInfo::SetSplitbarPos ═══ Remarks Set the position of the splitbar of a container. Parameters LONG the position in window-pixels ═══ 3.24. XContainerObject ═══ Overview Functions columns  SetColumnData constructors/destructors  XContainerObject emphasis  GetEmphasis icon/bitmap  GetBitmap  GetIcon  SetBitmap  SetIcon  SetMiniBitmap  SetMiniIcon misc  AllocMemory  TitleEdited title  GetTitle  SetTitle ═══ 3.24.1. XContainerObject overview ═══ Parent class: XObject Overview ═══ 3.24.2. XContainerObject::SetColumnData ═══ Remarks Set data for an column for detail-view Set data for an column for detail-view Set data for an column for detail-view Set data for an column for detail-view Set data for an column for detail-view Set data for an column for detail-view Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │XTime * │data │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │XDate * │data │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │XIcon * │data │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │XBitmap * │data │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │LONG │data │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT │column-number (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │char * │data │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.24.3. XContainerObject::XContainerObject ═══ Remarks Construct a container-item Parameters ┌────────────────────┬────────────────────────────────────────┐ │XContainerControl * │owner │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │count of columns in detail-view (default│ │ │is NULL) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.24.4. XContainerObject::GetEmphasis ═══ Remarks Query emphasis of the object. Return-Value LONG emphasis (see XContainer::SetObjectEmphasis() for details) ═══ 3.24.5. XContainerObject::GetBitmap ═══ Remarks Get the bitmap of the object Parameters XBitmap * buffer ═══ 3.24.6. XContainerObject::GetIcon ═══ Remarks Querry the icon of the object Parameters XIcon * buffer ═══ 3.24.7. XContainerObject::SetBitmap ═══ Remarks Set object-bitmap. Parameters XBitmap * bitmap ═══ 3.24.8. XContainerObject::SetIcon ═══ Remarks Set object-icon Parameters XIcon * icon ═══ 3.24.9. XContainerObject::SetMiniBitmap ═══ Remarks Set the mini-bitmap of the object Parameters XBitmap * bitmap ═══ 3.24.10. XContainerObject::SetMiniIcon ═══ Remarks Set object mini-icon Parameters XIcon * icon ═══ 3.24.11. XContainerObject::AllocMemory ═══ Remarks This method is called if it is nessacary to realloc memory for objects in detail-view Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the new Title │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │lenght of the new text │ ├────────────────────┼────────────────────────────────────────┤ │XContainerColumn* │in detail view this parameter contains a│ │ │pointer to the related column. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.24.12. XContainerObject::TitleEdited ═══ Remarks This method is called if the user has edited the title of the object or the objects title of a column in detail view. Overwrite this method if you need the information Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the new Title │ ├────────────────────┼────────────────────────────────────────┤ │XContainerColumn* │in detail view this parameter contains a│ │ │pointer to the related column. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.24.13. XContainerObject::GetTitle ═══ Remarks Query the title of the object; Parameters XString * buffer ═══ 3.24.14. XContainerObject::SetTitle ═══ Remarks Set the title of the object. Memory for the title is allocated by the object. Parameters char * title ═══ 3.25. XControl ═══ Overview ═══ 3.25.1. XControl overview ═══ Parent class: XWindow Overview XControl is the basic class for user input/output windows. You cannot create a XControl directly. ═══ 3.26. XControlEvent ═══ Overview Functions  GetEventID  GetWindow  GetWindowID ═══ 3.26.1. XControlEvent overview ═══ Parent class: XEvent Overview The XControlEvent is send to a XFrameWindow when the user has performed some interaction with a client window of the frame window. If you have caught the XControlEvent by overriding XFrameWindow::DoControl you can get information about the sending window and the type (ID) of the event. Valid event-IDяs are: ┌────────────────────┬────────────────────────────────────────┐ │WIN_CHANGED │the content of the client has changed │ ├────────────────────┼────────────────────────────────────────┤ │WIN_DBLCLICK │the user double-clicked on the window │ ├────────────────────┼────────────────────────────────────────┤ │WIN_PAINT │the window will be redrawn │ ├────────────────────┼────────────────────────────────────────┤ │WIN_ENTER │the user pressed ENTER │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SELECTED │an item of the window was selected │ ├────────────────────┼────────────────────────────────────────┤ │WIN_VSCROLL │the window scrolls it contents │ ├────────────────────┼────────────────────────────────────────┤ │WIN_HSCROLL │the window scrolls it contents │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SETFOCUS │the window recieves the focus │ ├────────────────────┼────────────────────────────────────────┤ │WIN_KILLFOCUS │the window lost the focus │ ├────────────────────┼────────────────────────────────────────┤ │WIN_SHOWLIST │the list of a XComboBox will be │ │ │displayed │ ├────────────────────┼────────────────────────────────────────┤ │WIN_TRACK │the user tracks the window (in XSlider) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_ENDTRACK │the user stopped tracking (in XSlider) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_UPARROW │the user pressed the arrow "up" (in │ │ │XSpinButton) │ ├────────────────────┼────────────────────────────────────────┤ │WIN_DOWNARROW │the user pressed the arrow "down" (in │ │ │XSpinButton) │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_PLAYED │a media-window has completed playing a │ │ │file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_PAUSED │a media-window paused playing a file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_REWINDED │a media-window completed rewinding a │ │ │file │ ├────────────────────┼────────────────────────────────────────┤ │MEDIA_STOPED │a media-window stoped playing a file │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.26.2. XControlEvent::GetEventID ═══ Remarks Returns a pointer to the window which has send the event Return-Value LONG id the id of the event, see XControlEvent. ═══ 3.26.3. XControlEvent::GetWindow ═══ Remarks Returns a pointer to the window which has send the event Return-Value XWindow * thePointer the pointer of the sending window, if you know the window type, you can typecast to the needed class ═══ 3.26.4. XControlEvent::GetWindowID ═══ Remarks Returns the ID of the window which has send the event Return-Value LONG theWindowID the ID of the sending window ═══ 3.27. XCountryInfo ═══ Overview Functions  GetCountry  GetDateFormat constructors/destructors  XCountryInfo ═══ 3.27.1. XCountryInfo overview ═══ Parent class: XObject Overview ═══ 3.27.2. XCountryInfo::GetCountry ═══ Remarks Query the country Return-Value ID of the country: ┌────────────────────┬────────────────────────────────────────┐ │Asian English │099 │ ├────────────────────┼────────────────────────────────────────┤ │Australia │061 │ ├────────────────────┼────────────────────────────────────────┤ │Belgium │032 │ ├────────────────────┼────────────────────────────────────────┤ │Canadian French │002 │ ├────────────────────┼────────────────────────────────────────┤ │Czechoslovakia │042 │ ├────────────────────┼────────────────────────────────────────┤ │Denmark │045 │ ├────────────────────┼────────────────────────────────────────┤ │Finland │358 │ ├────────────────────┼────────────────────────────────────────┤ │France │033 │ ├────────────────────┼────────────────────────────────────────┤ │Germany │049 │ ├────────────────────┼────────────────────────────────────────┤ │Hungary │036 │ ├────────────────────┼────────────────────────────────────────┤ │Iceland │354 │ ├────────────────────┼────────────────────────────────────────┤ │Italy │039 │ ├────────────────────┼────────────────────────────────────────┤ │Japan │081 │ ├────────────────────┼────────────────────────────────────────┤ │Japan SAA │081 │ ├────────────────────┼────────────────────────────────────────┤ │Korea │082 │ ├────────────────────┼────────────────────────────────────────┤ │Korea SAA │082 │ ├────────────────────┼────────────────────────────────────────┤ │Latin America │003 │ ├────────────────────┼────────────────────────────────────────┤ │Netherlands │031 │ ├────────────────────┼────────────────────────────────────────┤ │Norway │047 │ ├────────────────────┼────────────────────────────────────────┤ │People's Republic of│086 │ │China │ │ ├────────────────────┼────────────────────────────────────────┤ │Poland │048 │ ├────────────────────┼────────────────────────────────────────┤ │Portugal │351 │ ├────────────────────┼────────────────────────────────────────┤ │Spain │034 │ ├────────────────────┼────────────────────────────────────────┤ │Sweden │046 │ ├────────────────────┼────────────────────────────────────────┤ │Switzerland │041 │ ├────────────────────┼────────────────────────────────────────┤ │Taiwan │088 │ ├────────────────────┼────────────────────────────────────────┤ │Turkey │090 │ ├────────────────────┼────────────────────────────────────────┤ │United Kingdom │044 │ ├────────────────────┼────────────────────────────────────────┤ │United States │001 │ ├────────────────────┼────────────────────────────────────────┤ │Yugoslavia │038 │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.27.3. XCountryInfo::GetDateFormat ═══ Remarks Query the format of a date value Return-Value ┌────────────────────┬────────────────────────────────────────┐ │0 │format is mmddyy │ ├────────────────────┼────────────────────────────────────────┤ │1 │format is ddmmyy │ ├────────────────────┼────────────────────────────────────────┤ │2 │format is yymmdd │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.27.4. XCountryInfo::XCountryInfo ═══ Remarks Constructor needed to query some information about the current country. Query information about the country from the system ═══ 3.28. XDBaseFile ═══ Overview Functions contructors/destructors  XDBaseFile misc  SaveHeader ═══ 3.28.1. XDBaseFile overview ═══ Parent class: XObject Overview ═══ 3.28.2. XDBaseFile::XDBaseFile ═══ Remarks Create/Open a DBaseIII - file. The behaviour differs from the used parameters. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileName │Name of the file. A full qualified path │ │ │can be nessacary. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL writeAccess │TRUE=allow writing. The file will be │ │ │locked for other applications for │ │ │writing. │ │ │ FALSE=read-only, other applications may│ │ │write to the file. │ │ │ (default is FALSE) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL createNew │TRUE=create a new file. The file is not │ │ │writen to disk until you call XDBaseFile│ │ │::SaveHeader(). │ ├────────────────────┼────────────────────────────────────────┤ │FALSE=open a │ │ │existing file. │ │ │ (default is FALSE) │ │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the function fails an exception of the type XDBaseException is thrown. ═══ 3.28.3. XDBaseFile::SaveHeader ═══ Remarks Save the headerSize (dBaseIII-description) of the file. The current loaded file is closed and the new file (if the filename differs from the original filename) is opend. If a file exists, it will be overwriten! The function resets the content, no records are saved! This function should only be called if you have used XDBaseFile::AddField() for inserting one or more new Fields to the table (from this reason no records can be saved). You can use this function to create a copy of the declaration of a dbaseIII-file: 1. Open the file which contains the declaration and records: XDBaseFile file("orgfile.dbf"); 2. You can add new fields to the declaration: file.AddField("DATE", XDBASE_FIELD_DATE, 8); 3. Save the declaration in a new file: file.SaveHeader( "newfile.dbf"); Parameters char * fileName Exceptions If the function fails an exception of the type XDBaseException is thrown. ═══ 3.29. XDBaseRecord ═══ Overview Functions  Remove  Save  XDBaseRecord ═══ 3.29.1. XDBaseRecord overview ═══ Parent class: XObject Overview ═══ 3.29.2. XDBaseRecord::Remove ═══ Remarks Mark a record as deleted. The record cannot be loaded any mre. Return-Value BOOL success ═══ 3.29.3. XDBaseRecord::Save ═══ Remarks Save a record. If the record is new it will be attached at the end of the file. Return-Value BOOL success ═══ 3.29.4. XDBaseRecord::XDBaseRecord ═══ Remarks Construct a record. A record is a single column of a XDBaseFile. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XDBaseFile * │database │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │zero based index of the record. │ │ │ 0=create a new record │ │ │ other=index of a record to load │ └────────────────────┴────────────────────────────────────────┘ Example //In this example all records of a file will be read //and are stored in a collection XDbaseFile file(...); list recordList; for(int i=0; i < file.GetRecordCount(); i++) { try { XDBaseRecord * record = new XDBaseRecord( i); recordList.push_back(record); } catch( XDBaseException e) { //the exception can be ignored here: the requested //record is removed from the file } } . Exceptions If the function fails an exception of the type XDBaseException is thrown. Usualy this exception is thrown when an index-value was given but no record with this index exists or the record is marked as deleted. ═══ 3.30. XDDE ═══ Overview Functions Server functions  ConnectionRequested application notification  AdviseRequested  Connected  DataReceived  DataRequested  DisConnected connect  InitPossible connection  Init  Terminate constructors/destructors  XDDE  ~XDDE data exchange  Advise  GetData  PokeData  SendCommand  SendData  UnAdvise misc  IsConnected  QueryOwner server functions  AcceptConnection ═══ 3.30.1. XDDE overview ═══ Overview XDDE supports "dynamic data exchange". An instance of XDDE can be server or client, it should be possible to create two or more XDDEяs for one window. See OS/2 documentation for details. ═══ 3.30.2. XDDE::ConnectionRequested ═══ Remarks You must overwrite this method. It is called if a client wants to establish a connection. If you want to response and establish the connection call XDDE::AcceptConnection() Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │required application-name │ ├────────────────────┼────────────────────────────────────────┤ │char * │required topic-name │ ├────────────────────┼────────────────────────────────────────┤ │OOL_WINDOWHANDLE │window-handle of the client │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.3. XDDE::AdviseRequested ═══ Remarks Informs a server that an advise is requested. Override this function if you need this information. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │format of the data │ ├────────────────────┼────────────────────────────────────────┤ │OOL_WINDOWHANDLE │handle of the client │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.4. XDDE::Connected ═══ Remarks Informs a server that a client has been connected. Override this function if you need this information. Parameters OOL_WINDOWHANDLE handle of the client ═══ 3.30.5. XDDE::DataReceived ═══ Remarks Informs that datas has been received. Override this function if you need this information. Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │size of the data │ ├────────────────────┼────────────────────────────────────────┤ │void * │buffer which holds the data │ ├────────────────────┼────────────────────────────────────────┤ │char * │item name │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │format of the data │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.6. XDDE::DataRequested ═══ Remarks Informs a server that datas are needed. Override this function if you need this information. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │item name │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │format of the data │ ├────────────────────┼────────────────────────────────────────┤ │OOL_WINDOWHANDLE │the clients handle │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.7. XDDE::DisConnected ═══ Remarks Informs that the xdde-instance has no more connections. Override this function if you need this information. ═══ 3.30.8. XDDE::InitPossible ═══ Remarks Informs the application that a server is ready for a DDE connect. Return TRUE for a connect, otherwise return FALSE. On default this function returns allways TRUE, you must override this function to code the behaviour you want. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │applivcation name of the possible server│ ├────────────────────┼────────────────────────────────────────┤ │char * │toppic-name that the possible server │ │ │supports │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL connect ═══ 3.30.9. XDDE::Init ═══ Remarks Initiates a connection from a client to a server. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │needed application name │ ├────────────────────┼────────────────────────────────────────┤ │char * │needed topic name │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.30.10. XDDE::Terminate ═══ Remarks Terminates the dde-connection ═══ 3.30.11. XDDE::XDDE ═══ Remarks Constructs a XDDE instance Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │the window to handle dde for. If you │ │ │have set a control as a client for a │ │ │framewindow with SetClient() you must │ │ │give the control as the owner of the │ │ │XDDE instance, not the frame window! │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE = server is generated, FALSE = │ │ │client is generated (default is FALSE).│ │ │If a server is generated XDDE will │ │ │handle all events automaticaly, for │ │ │clients you must call XDDE::Init() to │ │ │get a connection to a server │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.12. XDDE::~XDDE ═══ Remarks The destructor of an instance is not called automaticaly, so donяt forget to call this function. If a connection is established, XDDE::Terminate() is called automaticaly ═══ 3.30.13. XDDE::Advise ═══ Remarks Calls the server to establish a continous data-exchange Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │needed format of data │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.14. XDDE::GetData ═══ Remarks Calls the server send data one time Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │needed format of data │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.15. XDDE::PokeData ═══ Remarks Poke data Parameters ┌────────────────────┬────────────────────────────────────────┐ │OOL_WINDOWHANDLE │handle of the receiver │ ├────────────────────┼────────────────────────────────────────┤ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │void * │buffer which holds data │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │size of the buffer │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │format of the data (default is │ │ │DDEF_TEXT) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.16. XDDE::SendCommand ═══ Remarks Send a command Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │char * │command to execute (max. 2000 chars) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.17. XDDE::SendData ═══ Remarks Send data to a client Parameters ┌────────────────────┬────────────────────────────────────────┐ │OOL_WINDOWHANDLE │handle of the receiver │ ├────────────────────┼────────────────────────────────────────┤ │char * │the name of the requested item │ ├────────────────────┼────────────────────────────────────────┤ │void * │buffer which holds data │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │size of the buffer │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │format of the data (default is │ │ │DDEF_TEXT) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.30.18. XDDE::UnAdvise ═══ Remarks Calls the server to stop continous data-exchange Parameters char * the name of the requested item Return-Value BOOL success ═══ 3.30.19. XDDE::IsConnected ═══ Remarks Returns if a connection is established or not Return-Value BOOL connected ═══ 3.30.20. XDDE::QueryOwner ═══ Remarks Returns a pointer to the owner window Return-Value XWindow * the owner ═══ 3.30.21. XDDE::AcceptConnection ═══ Remarks A server must allways overwrite XDDE::ConnectionRequested(). If that method is called you can decide if you want to establish a connection. If you want to establish a connection call this function with the needed parameters. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │supported application-name │ ├────────────────────┼────────────────────────────────────────┤ │char * │supported topic-name │ ├────────────────────┼────────────────────────────────────────┤ │OOL_WINDOWHANDLE │window handle of the client │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.31. XDate ═══ Overview Functions  AddDays  GetDateFromDay  GetDayOfYear  GetDaysOfMonth  GetTotalDaysOfYear  GetWeek  GetWeekBegin  GetWeekDay  IsLeapYear misc  Compare  Format  GetCurrentDate ═══ 3.31.1. XDate overview ═══ Parent class: XObject Overview ═══ 3.31.2. XDate::AddDays ═══ Remarks Add/substract days to/from the current date. Parameters SHORT days to add/substract (can be negative) Return-Value BOOL result ═══ 3.31.3. XDate::GetDateFromDay ═══ Remarks Returns a date which is created from a number of days in a given year. Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT │days (1-366) │ ├────────────────────┼────────────────────────────────────────┤ │USHORT │years │ └────────────────────┴────────────────────────────────────────┘ Return-Value XDate result ═══ 3.31.4. XDate::GetDayOfYear ═══ Remarks Returns the number of the day in the current year. Return-Value USHORT number (1-366) ═══ 3.31.5. XDate::GetDaysOfMonth ═══ Remarks Returns the number of days in the cureent month Return-Value UCHAR number (1-31) ═══ 3.31.6. XDate::GetTotalDaysOfYear ═══ Remarks returns the count of days of the current year Return-Value USHORT count ═══ 3.31.7. XDate::GetWeek ═══ Remarks Returns the number in the current year. Return-Value USHORT weeknumber (1-53) ═══ 3.31.8. XDate::GetWeekBegin ═══ Remarks Returns the date of the 1st day of the week Return-Value XDate result ═══ 3.31.9. XDate::GetWeekDay ═══ Remarks Returns the weekday of the current date. Return-Value UCHAR weekday (0-6, 0=monday) ═══ 3.31.10. XDate::IsLeapYear ═══ Remarks Query if a leap year is given Return-Value BOOL ═══ 3.31.11. XDate::Compare ═══ Remarks Compares the date with another Parameters XDate* date to compare with Return-Value ┌────────────────────┬────────────────────────────────────────┐ │SHORT result │-1 the date stored is earlier, 0 the │ │ │date are equal,1 the date stored is │ │ │later │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.31.12. XDate::Format ═══ Remarks Print the date into a string Parameters ┌────────────────────┬────────────────────────────────────────┐ │XString* │buffe which gets the date │ ├────────────────────┼────────────────────────────────────────┤ │char* │format, see strftime() for details │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.31.13. XDate::GetCurrentDate ═══ Remarks Query the current date from the system ═══ 3.32. XDateEntryField ═══ Overview Functions constructors/destructors  XDateEntryField ═══ 3.32.1. XDateEntryField overview ═══ Parent class: XEntryField Overview XDateEntryField is a single-line text field for dates. ═══ 3.32.2. XDateEntryField::XDateEntryField ═══ Remarks Constructs an entryfield for dates. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the entryfield │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ ├────────────────────┼────────────────────────────────────────┤ │EN_LEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_CENTER │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_RIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSCROLL │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_MARGIN │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOTAB │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_READONLY │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_UNREADABLE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSIZE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_BORDER │ │ └────────────────────┴────────────────────────────────────────┘ (can be or-ed) const char * string text to display const char * font font to use BOOL checkDates TRUE=check entered date when the focus is lost. If the entered date is not a legal date, the background turns red. FALSE=dont check entered values. ═══ 3.33. XDialog ═══ Overview Functions  DoCommand ═══ 3.33.1. XDialog overview ═══ Parent class: XWindow Overview XDialog is the base class for XModalDialog and XModelessDialog. You cannot construct an instance of XDialog directly, you have to chose one of the child-classes. ═══ 3.33.2. XDialog::DoCommand ═══ Remarks If a command was received by a dialog, eg. from a button, you must decide if the dialog can be destroyed or not. Override the XDialog::DoCommand() function, return TRUE if the dialog can be destroyed, otherwise return FALSE. Parameters LONG command Return-Value BOOL TRUE=destroy, FALSE=do not destroy ═══ 3.34. XDragEvent ═══ Overview Functions  GetDragItem  GetDragItemCount  GetDropPos  GetSourceWindow  SetAcceptMode  SetOperation ═══ 3.34.1. XDragEvent overview ═══ Parent class: XEvent XEvent Overview For drag-events a XDragEvent is generated, to catch them you need to install a XDragHandler. Possible event-IDs are: ┌────────────────────┬────────────────────────────────────────┐ │DRG_DROPPED │An item was dropped. │ ├────────────────────┼────────────────────────────────────────┤ │DRG_DRAGOVER │An item fly over the window. │ ├────────────────────┼────────────────────────────────────────┤ │DRG_ENDCONVERSATION │The converation ends. No informations │ │ │about dragitems avaible! │ ├────────────────────┼────────────────────────────────────────┤ │DRG_DISCARDOBJECT │Delete the items(s). │ ├────────────────────┼────────────────────────────────────────┤ │DRG_PRINTOBJECT │Print the item(s). Use │ │ │QueryPrinterInfo() to get information │ │ │about the requested printer. │ └────────────────────┴────────────────────────────────────────┘ For drag-events in a container see:  XContainerDragEvent  XContainerEvent  XContainerHandler Drag/drop events generate a XDragEvent, you catch them with XDragHandler. If drag-events should be cought in a container-control use XContainerDragEvent / XContainerHandler. ═══ 3.34.2. XDragEvent::GetDragItem ═══ Remarks Query a dragitem. Parameters XDragItem * buffer buffer which will get the item-information SHORT index zero-based index of item to query ═══ 3.34.3. XDragEvent::GetDragItemCount ═══ Remarks Return the count of drag-items of this dragevent Return-Value SHORT count of items ═══ 3.34.4. XDragEvent::GetDropPos ═══ Remarks Query the position where the objects were dropped Parameters XPoint * position buffer which will get the position ═══ 3.34.5. XDragEvent::GetSourceWindow ═══ Remarks Query the system-define handle of the window where the objects were dropped. ═══ 3.34.6. XDragEvent::SetAcceptMode ═══ Remarks Set the operation supported by the application which receives the drag-event Parameters SHORT accept the opperation, possible values are ┌────────────────────┬────────────────────────────────────────┐ │DRG_DROP │accept the items │ ├────────────────────┼────────────────────────────────────────┤ │DRG_NODROP │dont accept the items in this case │ ├────────────────────┼────────────────────────────────────────┤ │DRG_NEVERDROP │never accept the items │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.34.7. XDragEvent::SetOperation ═══ Remarks Set the operation supported by the application which generates the drag-event Parameters SHORT operation the opperation, possible values are ┌────────────────────┬────────────────────────────────────────┐ │DRG_COPY │copy the items │ ├────────────────────┼────────────────────────────────────────┤ │DRG_MOVE │move the items │ ├────────────────────┼────────────────────────────────────────┤ │DRG_LINK │link the items │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.35. XDragHandler ═══ Overview Functions  XDragHandler ═══ 3.35.1. XDragHandler overview ═══ Parent class: XHandler Overview To catch drag-events you need to derive a class from XDragHandler and override the method HandleEvent() where you will get the events (XDragEvent). ═══ 3.35.2. XDragHandler::XDragHandler ═══ Parameters XWindow * window The window to handle the events for. ═══ 3.36. XEntryField ═══ Overview Functions clipboard functions  Clear  Copy  Cut  GetSelection  Paste  SelectText constructors/destructors  XEntryField misc  EnableOverWrite  GetFirstChar  IsChanged  IsReadOnly  SetLimit  SetReadOnly  ShowFirstChar ═══ 3.36.1. XEntryField overview ═══ Parent class: XControl Overview XEntryField is a single-line text field. ═══ 3.36.2. XEntryField::Clear ═══ Remarks Delete the marked text. ═══ 3.36.3. XEntryField::Copy ═══ Remarks Copy the marked text to the clipboard. ═══ 3.36.4. XEntryField::Cut ═══ Remarks Cut marked text and put it to the clipboard. ═══ 3.36.5. XEntryField::GetSelection ═══ Remarks Query the boundarys of the current selection. Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT& │starting point of selection │ ├────────────────────┼────────────────────────────────────────┤ │SHORT& │end point │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.36.6. XEntryField::Paste ═══ Remarks Paste text from the clipboard. ═══ 3.36.7. XEntryField::SelectText ═══ Remarks Select text from startpoint to an endpoint. Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT │the starting point of selection │ ├────────────────────┼────────────────────────────────────────┤ │USHORT │end-point of selection │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.36.8. XEntryField::XEntryField ═══ Remarks Constructs an entryfield. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the entryfield │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ ├────────────────────┼────────────────────────────────────────┤ │EN_LEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_CENTER │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_RIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSCROLL │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_MARGIN │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOTAB │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_READONLY │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_UNREADABLE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSIZE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_BORDER │ │ └────────────────────┴────────────────────────────────────────┘ (can be or-ed) const char * string text to display (default is NULL) const char * font font to use (default is NULL) ═══ 3.36.9. XEntryField::EnableOverWrite ═══ Remarks Enables/disables overwrite-mode. Parameters BOOL overwrite TRUE=overWrite, FALSE=disable overWrite ═══ 3.36.10. XEntryField::GetFirstChar ═══ Remarks Query the index of the first visible charakter. Return-Value SHORT index ═══ 3.36.11. XEntryField::IsChanged ═══ Remarks Query if the content has changed. Return-Value BOOL result ═══ 3.36.12. XEntryField::IsReadOnly ═══ Remarks Query if the entryfild is in readonly-mode. Return-Value BOOL result ═══ 3.36.13. XEntryField::SetLimit ═══ Remarks Set maximum number of charakters. Parameters USHORT length maximum size ═══ 3.36.14. XEntryField::SetReadOnly ═══ Remarks Enable/disable readonly-mode. Parameters BOOL readOnly TRUE=enable, FALSE=disable readonly-mose ═══ 3.36.15. XEntryField::ShowFirstChar ═══ Remarks Select the first char to display Parameters SHORT firstChar the first char which will be displayed ═══ 3.37. XEvent ═══ Overview Functions  GetEventID ═══ 3.37.1. XEvent overview ═══ Parent class: XObject Overview ═══ 3.37.2. XEvent::GetEventID ═══ Remarks GetEventID return the ID of the event which ocures. Valid IDяs are specified by the classes derived from XEvent Return-Value ULONG theEventID ═══ 3.38. XEventSemaphore ═══ Overview Functions constructors/destructors  XEventSemaphore misc  Close  Post  Reset  Wait ═══ 3.38.1. XEventSemaphore overview ═══ Parent class: XSemaphore Overview ═══ 3.38.2. XEventSemaphore::XEventSemaphore ═══ Remarks open an event-semaphore which was created by another process Create an event-semaphore Parameters char * name the name of the semaphore to open WITHOUT leading '\\SEM32\\' ┌────────────────────┬────────────────────────────────────────┐ │char * name │the name of the semaphore to create │ │ │WITHOUT leading '\\SEM32\\' │ ├────────────────────┼────────────────────────────────────────┤ │BOOL shared │TRUE=shared semaphore │ │ │FALSE=no shared semaphore │ ├────────────────────┼────────────────────────────────────────┤ │BOOL isSet │TRUE=state is posted │ │ │FALSE=state is not posted │ │ │(default is FALSE) │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XSemaphoreException is thrown If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.38.3. XEventSemaphore::Close ═══ Remarks close an event-semaphore Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.38.4. XEventSemaphore::Post ═══ Remarks Post an event. All semaphores which have opened this semaphore and are waiting gets post means they are unlocked. Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.38.5. XEventSemaphore::Reset ═══ Remarks resets an event-semaphore Return-Value ULONG count of registered clients of the semaphore Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.38.6. XEventSemaphore::Wait ═══ Remarks Wait for a semaphore until it post or until timeout. Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG timeout │-1=wait endless │ │ │ 0 = return at once │ │ │ other=time to wait max. (in │ │ │milliseconds) │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.39. XException ═══ Overview Functions Get information  GetErrorCode  GetErrorMessage Show information  PrintError  ShowError ═══ 3.39.1. XException overview ═══ Overview The OOL throws exceptions in form of this class. You can catch this exceptions and exceptions derived from this class in the usual way. To throw exceptions yourself you may use the macro OOLThrow with exception-text and errorcode, eg OOLThrow("an exception", 100) For derived exception-classes this macro is redefined. ═══ 3.39.2. XException::GetErrorCode ═══ Remarks returns the error-code Return-Value LONG theCode ═══ 3.39.3. XException::GetErrorMessage ═══ Remarks returns a char pointer with the error text Return-Value char * errorText ═══ 3.39.4. XException::PrintError ═══ Remarks Displays information about the exception on the commandline. This function should only be used with VIO-applications. ═══ 3.39.5. XException::ShowError ═══ Remarks Displays a messagebox with information about the exception. This function should only be used with PM-applications. Parameters XWindow * owner owner window, can be NULL. ═══ 3.40. XFile ═══ Overview Functions EAs  GetEA  GetEAList  SetEA  SetEAList directorys  CreateDirectory  DeleteDirectory  GetCurrentDirectory disks  GetCurrentDisk  IsDriveAvaible  SetDefaultDisk misc  Copy  GetFileInfo  Move  Remove  ResetBuffer  SetFileInfo open/close  Open ═══ 3.40.1. XFile overview ═══ Parent class: XIO Overview ═══ 3.40.2. XFile::GetEA ═══ Remarks Read a single EA-entry of a file Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileName │name of the file │ ├────────────────────┼────────────────────────────────────────┤ │XEA * ea │buffer to a XEA │ ├────────────────────┼────────────────────────────────────────┤ │char * eaName │name of the EA to read │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG result ═══ 3.40.3. XFile::GetEAList ═══ Remarks Read all EAs of a file. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileName │name of the file │ ├────────────────────┼────────────────────────────────────────┤ │XEAList* list │buffer of type XEAList │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG result ═══ 3.40.4. XFile::SetEA ═══ Remarks Save an EA. If the EA exists it will be replaced otherwise added to the EA-list of the file. An EA can also removed from the file's EA-list when you set valueSize to zero of the EA to remove. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * fileame │name of the file │ ├────────────────────┼────────────────────────────────────────┤ │XEA* ea │buffer with EA to save │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG ═══ 3.40.5. XFile::SetEAList ═══ Remarks Save a list of EAs to a file Parameters ┌────────────────────┬────────────────────────────────────────┐ │char* filename │name of the file │ ├────────────────────┼────────────────────────────────────────┤ │XEAList* list │list of EAs to save │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG result ═══ 3.40.6. XFile::CreateDirectory ═══ Remarks Creates a directory Parameters char * path of the directory to create ═══ 3.40.7. XFile::DeleteDirectory ═══ Remarks Delete a directory Parameters char * path of the directory to delete ═══ 3.40.8. XFile::GetCurrentDirectory ═══ Remarks Query the current directory Parameters XString * buffer to hold the data ═══ 3.40.9. XFile::GetCurrentDisk ═══ Remarks Query the current disk Parameters char&buffer to hold data (will contain A,B,..) ═══ 3.40.10. XFile::IsDriveAvaible ═══ Remarks Query if a drive is avaible or not Parameters char drive the drive (A, B, ....) Return-Value BOOL result ═══ 3.40.11. XFile::SetDefaultDisk ═══ Remarks Set the dault disk Parameters ┌────────────────────┬────────────────────────────────────────┐ │char │the drive (A, B, ....) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.40.12. XFile::Copy ═══ Remarks Copy a file Parameters char * from file to copy (including path if nessecary) char * to destination (including path if nessecary) Return-Value ULONG result returncode from the OS. ═══ 3.40.13. XFile::GetFileInfo ═══ Remarks Query information about files. To access information the file must be open and XFILE_SHARE_DENYWRITE must be set! Parameters XFileInfo * pointer to an instance of XFileInfo Return-Value LONG result of the operatingsystem ═══ 3.40.14. XFile::Move ═══ Remarks Move a file Parameters char * from file to copy (including path if nessecary) char * to destination (including path if nessecary). If the same directory is given, Move() renames the file. Return-Value ULONG result returncode from the OS. ═══ 3.40.15. XFile::Remove ═══ Remarks Delete a file Parameters char * fileName name of the file to delete (including path if nessecary) Return-Value BOOL success ═══ 3.40.16. XFile::ResetBuffer ═══ Remarks Wait until all writen datas are physicaly saved Return-Value ULONG result returncode from the OS. ═══ 3.40.17. XFile::SetFileInfo ═══ Remarks Set file-information. To access information the file must be open with XFILE_READONLY and XFILE_SHARE_DENYWRITE must be set! Parameters XFileInfo * pointer to an instance of XFileInfo Return-Value LONG result of the operatingsystem ═══ 3.40.18. XFile::Open ═══ Remarks Open a file Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * path │the path of the file │ ├────────────────────┼────────────────────────────────────────┤ │ULONG modeForOpen │how to open, possible values are: │ │ │XFILE_REPLACE_EXISTING override existing│ │ │filea │ │ │XFILE_OPEN_EXISTING open if file exists │ │ │XFILE_FAIL_EXISTING cancel if the file │ │ │exists │ │ │XFILE_FAIL_IF_NEW cancel if the file │ │ │doesnяt exist │ │ │XFILE_CREATE_IF_NEW create a new file if│ │ │it doesnяt exist │ │ │ (can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG accessMode │mode for access, possible values are: │ │ │XFILE_READONLY │ │ │XFILE_WRITEONLY │ │ │XFILE_READWRITE │ │ │ (can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG shareMode │mode for file-sharing, possible values │ │ │are: │ │ │XFILE_SHARE_DENYREAD │ │ │XFILE_SHARE_DENYWRITE │ │ │XFILE_SHARE_DENYREADWRITE │ │ │XFILE_SHARE_DENYNONE │ │ │ (can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG size │size to open (only if a file is created,│ │ │default is 0) │ ├────────────────────┼────────────────────────────────────────┤ │EAOP2 * eaList │list with extended attributes (default │ │ │is NULL) │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG result returned by the OS ═══ 3.41. XFileDialog ═══ Overview Functions constructors/destructors  XFileDialog misc  GetCommand  GetFileCount  GetFileName ═══ 3.41.1. XFileDialog overview ═══ Parent class: XSystemDialog Overview ═══ 3.41.2. XFileDialog::XFileDialog ═══ Remarks Open the system defined file-dialog Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * theOwner │owner-window │ ├────────────────────┼────────────────────────────────────────┤ │char * filename │inital value for the filename entryfield│ │ │(default is <*>) │ ├────────────────────┼────────────────────────────────────────┤ │char * title │title of the dialog (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │char * filetype │file-type to be displayed (default is │ │ │NULL). │ ├────────────────────┼────────────────────────────────────────┤ │LONG options │options, valid values are: FD_OPEN │ │ │open-dialog FD_CENTER dialog is │ │ │centered FD_SAVEAS saveas-dialog │ │ │FD_MULTIPLESEL multiple file-selection │ │ │FD_HELP the dialog has a help-button. To│ │ │display help the owner-window must be │ │ │associated with a help-instance and in │ │ │th help-file there must be an entry with│ │ │an id of 267 (res=267) FD_MODELESS show│ │ │modeless FD_APPLYBUTTON apply-button │ │ │FD_EAS use EAs FD_FILTERUNION use │ │ │filter from string-filter and EAs │ │ │FD_HELPBUTTON show a help-button │ │ │(default is FD_OPEN | FD_CENTER, can be │ │ │or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │char ** typelist │List of filters for extended attributes │ │ │(default is NULL). The list must contain│ │ │a NULL, eg char * list[] = {"C Code", │ │ │"DIB", NULL}; │ ├────────────────────┼────────────────────────────────────────┤ │FNWP * dlgProc │an user-defined dialog-procedure. Use it│ │ │to implement your own file-filter or │ │ │redefine the apply-button. See oolglib.c│ │ │for an example. │ ├────────────────────┼────────────────────────────────────────┤ │ULONG ulUser │optional parameter for your own │ │ │dialog-procedure │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.41.3. XFileDialog::GetCommand ═══ Remarks Returns the action of the user Return-Value SHORT result: USER_OK or USER_CANCEL ═══ 3.41.4. XFileDialog::GetFileCount ═══ Remarks Returns the number of files selected Return-Value SHORT count of files ═══ 3.41.5. XFileDialog::GetFileName ═══ Remarks If the file-dialog is proceeded you can ask for the selected filename. If FD_MULTIPLESEL is specified, at first ask with GetFileCount() for the number of files selected. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XString* │the buffer which will contain the │ │ │filename │ ├────────────────────┼────────────────────────────────────────┤ │SHORT index │zero-based index of filename to get │ │ │(default is 0) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.42. XFileFind ═══ Overview Functions constructors/destructors  XFileFind  ~XFileFind find files  Find ═══ 3.42.1. XFileFind overview ═══ Parent class: XObject Overview ═══ 3.42.2. XFileFind::XFileFind ═══ Remarks Construct a XFileFind-instance (do not forget to call the destructor) Parameters char * mask for the files to find(e.g. "*.EXE" ) ═══ 3.42.3. XFileFind::~XFileFind ═══ Remarks Destroys a XFileFind-instance. Never forget to call the destructor! ═══ 3.42.4. XFileFind::Find ═══ Remarks After you have created an instance you can start to find files. Find() copy the filename found to the given bufer and returns TRUE, it returns FALSE if no file is found. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XString * │buffer to hold the filename │ ├────────────────────┼────────────────────────────────────────┤ │XFileInfo* │buffer for file-info │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL ═══ 3.43. XFileInfo ═══ Overview Functions file attributes  GetFileAttributes  IsArchived  IsDirectory  IsHidden  IsReadonly  IsSystem  SetFileAttributes get information  GetCreationDate  GetCreationTime  GetFileSize  GetLastWriteDate  GetLastWriteTime ═══ 3.43.1. XFileInfo overview ═══ Parent class: XObject Overview ═══ 3.43.2. XFileInfo::GetFileAttributes ═══ Remarks Query the files attributes Return-Value LONG attributes (can be or-ed):  XFILE_IS_NORMAL  XFILE_IS_HIDDEN  XFILE_IS_SYSTEM  XFILE_IS_DIRECTORY  XFILE_IS_ARCHIVED  XFILE_IS_READONLY ═══ 3.43.3. XFileInfo::IsArchived ═══ Remarks Query if the archived-bit is on Return-Value BOOL ═══ 3.43.4. XFileInfo::IsDirectory ═══ Remarks Query if the file is a directory Return-Value BOOL ═══ 3.43.5. XFileInfo::IsHidden ═══ Remarks Query if the file is hidden Return-Value BOOL ═══ 3.43.6. XFileInfo::IsReadonly ═══ Remarks Query if the file is readonly Return-Value BOOL ═══ 3.43.7. XFileInfo::IsSystem ═══ Remarks Query if the file is a system-file Return-Value BOOL ═══ 3.43.8. XFileInfo::SetFileAttributes ═══ Remarks Set the files attributes Parameters LONG attributes, can be or-ed:  XFILE_IS_NORMAL  XFILE_IS_HIDDEN  XFILE_IS_SYSTEM  XFILE_IS_DIRECTORY  XFILE_IS_ARCHIVED  XFILE_IS_READONLY ═══ 3.43.9. XFileInfo::GetCreationDate ═══ Remarks Query the date when the file was created. Parameters XDate * buffer buffer to hold the data ═══ 3.43.10. XFileInfo::GetCreationTime ═══ Remarks Query the time when the file was created. Parameters XTime * buffer buffer to hold the data ═══ 3.43.11. XFileInfo::GetFileSize ═══ Remarks Query the size of the file. Return-Value ULONG size ═══ 3.43.12. XFileInfo::GetLastWriteDate ═══ Remarks Query the date of last write-access Parameters XDate * buffer buffer to hold the data ═══ 3.43.13. XFileInfo::GetLastWriteTime ═══ Remarks Query the time of last write-access Parameters XTime * buffer buffer to hold the data ═══ 3.44. XFont ═══ Overview Functions constructors/destructors  XFont misc  GetPixelSize ═══ 3.44.1. XFont overview ═══ Parent class: XObject Overview ═══ 3.44.2. XFont::XFont ═══ Remarks Construct a font Parameters ┌────────────────────┬────────────────────────────────────────┐ │XGraphicDevice * │owner │ │device │ │ ├────────────────────┼────────────────────────────────────────┤ │char * fontName │name of the font │ ├────────────────────┼────────────────────────────────────────┤ │SHORT size │size │ ├────────────────────┼────────────────────────────────────────┤ │LONG options │options │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.44.3. XFont::GetPixelSize ═══ Remarks Returns the used count of pixels for the height of a single character. This size may differ from the logical size, escpacialy on a printer-device. Return-Value SHORT pixels ═══ 3.45. XFontDialog ═══ Overview Functions constructors/destructors  XFontDialog misc  GetFontName  GetFontSize ═══ 3.45.1. XFontDialog overview ═══ Parent class: XSystemDialog Overview _ ═══ 3.45.2. XFontDialog::XFontDialog ═══ Remarks Open the stystem-defined dialog to select a font. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │owner of the dialog │ ├────────────────────┼────────────────────────────────────────┤ │char * fontName │default font name │ ├────────────────────┼────────────────────────────────────────┤ │SHORT fontSize │default font size │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │style of the font, valid values are: │ ├────────────────────┼────────────────────────────────────────┤ │LONG atrributes │dialog attributes, valid values are: │ │ │FDLG_CENTER │ │ │ │ │ │FDLG_HELPBUTTON │ │ │FDLG_APPLYBUTTON │ │ │FDLG_RESETBUTTON │ │ │FDLG_MODELESS │ │ │FDLG_INITFROMFATTRS │ │ │FDLG_BITMAPONLY │ │ │FDLG_VECTORONLY │ │ │FDLG_FIXEDWIDTHONLY │ │ │FDLG_PROPORTIONALONLY │ │ │FDLG_NOSYNTHESIZEDFONTS │ │ │FDLG_NATIONAL_LANGUAGE │ ├────────────────────┼────────────────────────────────────────┤ │char * preview │text for the preview-window of the │ │ │dialog │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.45.3. XFontDialog::GetFontName ═══ Remarks Query the name of the selected font. Parameters XString * buffer buffer to hold the data ═══ 3.45.4. XFontDialog::GetFontSize ═══ Remarks Query the selected font-size Return-Value SHORT size ═══ 3.46. XFrameWindow ═══ Overview Functions colors  SetBackgroundColor constructors/destructors  XFrameWindow  ~XFrameWindow display a window  Activate  Enable  InitMenu  Maximize  Minimize  Restore  ShowModal drawing a window  Draw  EnableWindowUpdate  FillBackground menu functions  GetMenu misc  GetHandle  GetWindow  QueryForClose  SetClient  SetIcon size/position/order  GetClientSize  GetSize  SetBottom  SetSize  SetTop  Show text functions  GetText  SetText user input  DoCommand ═══ 3.46.1. XFrameWindow overview ═══ Parent class: XWindow Overview XFrameWindow is a window class which has a child and a frame. It supports menus and toolbars. ═══ 3.46.2. XFrameWindow::SetBackgroundColor ═══ Remarks With this function you set the color wich is used to fill the background in XFrameWindow::FillBackground(). Default color is black. If you change background color, you should do this before you start to insert client-windows. Parameters XColor * theNewColor ═══ 3.46.3. XFrameWindow::XFrameWindow ═══ Remarks Construct a frame-window Note that destructors of windows are called automaticaly when a window is closed! (see ~XFrameWindow) Parameters ┌────────────────────┬────────────────────────────────────────┐ │XResource * resource│a XResource contains two informations, │ │ │an ID and a pointer to a │ │ │XResourceLibrary. If you want to create │ │ │a window out of a resourcefile you must│ │ │specify the ID (otherwise it can be │ │ │zero) and the XResourceLibrary which │ │ │contains the window-resource. The │ │ │window which is created always belongs │ │ │to the process who owns the resource │ │ │library, so if you work with multiple │ │ │processes every process must have its │ │ │own resource library. │ ├────────────────────┼────────────────────────────────────────┤ │char * theTitle │The title of the window which is │ │ │displayed in the titlebar │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │You can specify the style of the window │ │ │with the following defines, which can │ │ │be or-ed: │ │ │FRM_TITLEBAR the window gets a titlebar │ │ │FRM_SYSMENU the window gets the system │ │ │menu │ │ │FRM_MINBUTTON the titlebar get a button │ │ │to minimize the window │ │ │ FRM_MAXBUTTON the titlebar get a button│ │ │to maximize the window │ │ │ FRM_CENTER the window is created in the│ │ │midle of the workplace │ │ │ FRM_SIZEBORDER the windowsize can be │ │ │changed by the user │ │ │ FRM_DIALOGBORDER the window gets a │ │ │thick border │ │ │ FRM_BORDER the window gets a thin │ │ │border │ │ │ FRM_TASKLIST the window is displayed in│ │ │the tasklist │ │ │ FRM_NOMOVEWITHOWNER the window dontяt │ │ │move when the parent is moved │ │ │ FRM_ICON the window get an icon wich is│ │ │identified by theResourceID, if the icon│ │ │is not found in the resource-library, an│ │ │error ocurses │ │ │ FRM_ACCELTABLE an acceltable will be │ │ │loaded from the resources with the │ │ │windows id. │ │ │ FRM_SYSMODAL the window is displayed │ │ │system-modal │ │ │FRM_SCREENALIGN │ │ │FRM_MOUSEALIGN │ │ │FRM_HIDEBUTTON │ │ │FRM_HIDEMAX │ │ │FRM_AUTOICON │ │ │there are three static member-variables │ │ │for default styles │ │ │defaultStyle default setting for a │ │ │framewindow │ │ │defaultClientStyle default setting for │ │ │windows wich are displayed as a │ │ │clientwindow of a framewindow │ │ │defaultDialogStyle default setting for │ │ │windows wich are displayed as a dialog │ │ │ Default is defaultStyle. │ ├────────────────────┼────────────────────────────────────────┤ │XRect * theRectangle│On default a window is created with │ │ │length and hight of zero. Windows which│ │ │are created with an resource template │ │ │get the size of the template. Default │ │ │is NULL. If theRectangle is specified, │ │ │the window gets the size of it. │ ├────────────────────┼────────────────────────────────────────┤ │XFrameWindow * │If parent is specified the window is a │ │parent │client of the parent. The behavior │ │ │depends on the styles you have set. │ │ │Default is NULL. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │If this variable is set OOL try to build│ │buildFromResource │the window with a resource template │ │ │which is identified by theResourceID. If│ │ │the template is not found, an error │ │ │ocurses. Default is FALSE. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL animate │Enable/disable animation on window │ │ │creation. Default is FALSE │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.46.4. XFrameWindow::~XFrameWindow ═══ Remarks Destructors of windows are called automaticaly when the window is closed. The destructor of XFrameWindow calles the destructor of every client window, menus and toolbars. Also the destructors of handlers (derived classes of XHandler) which are attached with it are called. If the last XFrameWindow of a process is closed, the process will terminate. If you want to close a window yourself, destruct the window with delete. ═══ 3.46.5. XFrameWindow::Activate ═══ Remarks Activate the window ═══ 3.46.6. XFrameWindow::Enable ═══ Remarks Enables/disables a window for user-input Parameters BOOL enable enables/disables the window (default is TRUE) ═══ 3.46.7. XFrameWindow::InitMenu ═══ Remarks If a menu must be initialized this function is called. If you want to setup the menu dynamicaly, override this function. Parameters XMenu * theMenu ═══ 3.46.8. XFrameWindow::Maximize ═══ Remarks Maximize the window ═══ 3.46.9. XFrameWindow::Minimize ═══ Remarks Minimize the window ═══ 3.46.10. XFrameWindow::Restore ═══ Remarks Restores the window if it is maximized or minimized ═══ 3.46.11. XFrameWindow::ShowModal ═══ Remarks ShowModal displays a window modal for another window which is specified in the first parameter, that means that the user cannot perform any input with the specified window. WARNING: you should only use this function for windows which are constructed with a resource template! If you do so the operating system stops with executing the calling code until the window is closed, otherwise the calling code is executed while the window is displayed. Parameters XFrameWindow * theOwnerWindow the window which is disabled until this window is closed ═══ 3.46.12. XFrameWindow::Draw ═══ Remarks This function is called if a window or a part of it must be redrawn. If you use a window which is not created from a resource template or you dontяt have set a client with SetClient(), you must override this function and call FillBackground(). ═══ 3.46.13. XFrameWindow::EnableWindowUpdate ═══ Remarks This function can stop drawing the window contents until you allow drawing. For complex windows there can be some performance-advantages. WARNING::ehp2. If you disable drawing of a window and attach a XToolBar to it, the position and size of the toolbar can not set correctly. Parameters BOOL enable enable/disable window drawing (default is TRUE) ═══ 3.46.14. XFrameWindow::FillBackground ═══ Remarks FillBackground fills the background in the color you have set with SetBackgroundColor (default is black). Usualy you call this function when you have overridden XFrameWindow::Draw(). You donяt have to call this function if a resource defined window is displayed or a window is set as client with XFrameWindow::SetClient(). ═══ 3.46.15. XFrameWindow::GetMenu ═══ Remarks Retrieve a pointer to the windows main-window Return-Value XMenuBar* a pointer to the menuBar ═══ 3.46.16. XFrameWindow::GetHandle ═══ Remarks GetHandle returns the window-handle defined by the operating system. The handle is different from the ID of the window and the pointers used by the OOL. In XFrameWindow the function returns: 1. if you have set a client window with function XFrameWindow::SetClient() the handle of the client 2. if the XFrameWindow displays a resource-defined window, the resource window handle is returned 3. on default, the handle of the client-rect is returned Return-Value OOL_WINDOWHANDLE theSystemHandle ═══ 3.46.17. XFrameWindow::GetWindow ═══ Remarks With GetWindow you can get a pointer of a child-window of XFrameWindow. Usualy it is used if the XFrameWindow is created with a resource template. Also you can get a pointer to windows which are created dynamicaly if you have specified an ID in the constructors of these windows. In this case you donяt need to store the pointers in your program. Parameters ULONG theWindowID the ID of the client window Return-Value XWindow * thePointer the pointer to the window you have asked for. If you know the type of the window, you can make a typcast to the needed class. ═══ 3.46.18. XFrameWindow::QueryForClose ═══ Remarks If the user trys to close a XFrameWindow this function is called. If you want to check if the window can be closed or not or to perform a security-check (for example with XMessageBox), override this function. This function is not called if you destroy the window with delete. Return-Value BOOL canBeClosed return TRUE if the window can be closed, otherwise return FALSE ═══ 3.46.19. XFrameWindow::SetClient ═══ Remarks SetClient is used to set a window, for example a control like a XMultiLineEdit, as a clientwindow of the XFrameWindow so sizing, moving and painting is automaticaly done. Moving/Sizing automaticaly may fail if the client is a frame-window. Parameters XWindow * theNewClient ═══ 3.46.20. XFrameWindow::SetIcon ═══ Remarks Set the icon which is displayed in the button of the system menu. Parameters OOL_ICONHANDLE theNewIcon ═══ 3.46.21. XFrameWindow::GetClientSize ═══ Remarks Query the size of the client area Parameters XRect * rect buffer to hold the data ═══ 3.46.22. XFrameWindow::GetSize ═══ Remarks Get the size and position of a window Parameters XRect * buffer to hold data ═══ 3.46.23. XFrameWindow::SetBottom ═══ Remarks Set the window to the bottom (in z-order) ═══ 3.46.24. XFrameWindow::SetSize ═══ Remarks Set the size and/or position of a window Set the size and/or position of a window Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │xPosition │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │yPosition │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │width │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │height │ └────────────────────┴────────────────────────────────────────┘ XRect * theNewSize ═══ 3.46.25. XFrameWindow::SetTop ═══ Remarks Set the window to the top (in z-order) ═══ 3.46.26. XFrameWindow::Show ═══ Remarks Displayes a window. The window wil be activated an be shown at the topmost position (in z-order). If the window is minimized the old position and size will be restored. Parameters BOOL show TRUE=show, FALSE=hide ═══ 3.46.27. XFrameWindow::GetText ═══ Remarks Query the title of the window Parameters XString * theBuffer theBuffer will contain the title of the window ═══ 3.46.28. XFrameWindow::SetText ═══ Remarks Set the Text which is displayed in the titlebar Parameters char * theNewText ═══ 3.46.29. XFrameWindow::DoCommand ═══ Remarks If the user selected a menuitem (from XMenuBar or XPopupMenu) if the user pressed a button of a toolbar which is attached to it the framewindow, this function is called. To get the ID of the action the user requested, override this function. Return TRUE if you have handled the command, otherwise return FALSE. Parameters LONG theCommandID the ID of the menuitem/toolbar-button Return-Value BOOL handled ═══ 3.47. XGLibFileDialog ═══ Overview Functions constructors/destructors  XGLibFileDialog ═══ 3.47.1. XGLibFileDialog overview ═══ ═══ 3.47.2. XGLibFileDialog::XGLibFileDialog ═══ Remarks Open a special file-dialog for bitmap-files supported by OOLGLIB. If this method is used, GBM.DLL and OLLRES.DLL must be in the LIBPATH. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * theOwner │owner-window │ ├────────────────────┼────────────────────────────────────────┤ │char * filename │inital value for the filename entryfield│ │ │(default is <*>) │ ├────────────────────┼────────────────────────────────────────┤ │char * title │title of the dialog (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │char * filetype │file-type to be displayed (default is │ │ │NULL). │ ├────────────────────┼────────────────────────────────────────┤ │LONG options │options, valid values are: FD_OPEN │ │ │open-dialog FD_CENTER dialog is │ │ │centered FD_SAVEAS saveas-dialog │ │ │FD_MULTIPLESEL multiple file-selection │ │ │FD_HELP the dialog has a help-button. To│ │ │display help the owner-window must be │ │ │associated with a help-instance and in │ │ │th help-file there must be an entry with│ │ │an id of 267 (res=267) FD_MODELESS show│ │ │modeless FD_OPTIONSBUTTON │ │ │options-button for filter-specific │ │ │parameters. Replaces FD_APPLYBUTTON. │ │ │FD_EAS use EAs FD_FILTERUNION use │ │ │filter from string-filter and EAs │ │ │FD_HELPBUTTON show a help-button │ │ │(default is FD_OPEN | FD_CENTER, can be │ │ │or-ed) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.48. XGraphicButton ═══ Overview Functions animation  Animate  GetAnimationRate  IsAnimationActive  SetAnimationRate constructors/destructors  XGraphicButton misc  IsSelected  Select  Toggle ═══ 3.48.1. XGraphicButton overview ═══ Parent class: XSettingButton Overview ═══ 3.48.2. XGraphicButton::Animate ═══ Remarks Start/stop to display the animation (if GB_ANIMATION is set) Parameters BOOL start TRUE=start, FALSE=stop BOOL fromBegining TRUE=display from beginning, FALSE=display from current position Return-Value BOOL success ═══ 3.48.3. XGraphicButton::GetAnimationRate ═══ Remarks Query the speed of the animation Return-Value LONG speed ═══ 3.48.4. XGraphicButton::IsAnimationActive ═══ Remarks Query if the animation is active Return-Value BOOL result ═══ 3.48.5. XGraphicButton::SetAnimationRate ═══ Remarks Set the speed of animation Parameters LONG rate speed Return-Value BOOL result ═══ 3.48.6. XGraphicButton::XGraphicButton ═══ Remarks Construct a graphic-button. To use this control you must invoke the multimedia-library! Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │owner of the button │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rectangle │rectangle for position/size │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style of the button: │ ├────────────────────┼────────────────────────────────────────┤ │GB_TWOSTATE │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_AUTOTWOSTATE │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_ANIMATION │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_AUTOANIMATION │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_DISABLEBITMAP │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_HILITEBITMAP │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_3D_TEXTRECESSED │ │ ├────────────────────┼────────────────────────────────────────┤ │GB_3D_TEXTRAISED │ │ └────────────────────┴────────────────────────────────────────┘ const char * title text to display SHORT bitmapCount number of bitmap-ids in parameter bitmapList SHORT * bitmapList array of bitmap-ids to use for an animation. Bitmaps with this ids must be in the programs resources (not in DLLs). ═══ 3.48.7. XGraphicButton::IsSelected ═══ Remarks Query if the button is selected Return-Value BOOL result ═══ 3.48.8. XGraphicButton::Select ═══ Remarks Select/deselect the button Parameters BOOL select TRUE=select, FALSE=deselect ═══ 3.48.9. XGraphicButton::Toggle ═══ Remarks Toggles the button ═══ 3.49. XGraphicDevice ═══ Overview Functions  FillBackground  SetBackgroundColor  XGraphicDevice drawing  Copy ═══ 3.49.1. XGraphicDevice overview ═══ Overview XGraphicDevice is a context in which graphic object can be created and drawn. There are two methods to use XGraphicDevice 1. Using one graphic device The most simple way is to use one graphic device in this case you only need to create the objects to draw in this device, every time it has to be redrawn (when the method Draw() of the owning window is called) you call the method Draw() of the device. 2. Using two graphic devices If you have a litle bit more objects you should use this method because it works faster. Create one device in memory (the second parameter of the constructor must be TRUE) and create the objects to draw on this device. Only call Draw() if you have inserted/removed one or more objcts. Create a second graphic device associated to the owning window. If the method Draw() of the owning window is called, copy the content of the memory-device to the window-associated device with Copy(). You can draw on a XGraphicDevice (and derived classes) with following classes:  XArc  XBitmap  XBox  XCircle  XLine  XMarker  XText ═══ 3.49.2. XGraphicDevice::FillBackground ═══ Remarks Fill the background ═══ 3.49.3. XGraphicDevice::SetBackgroundColor ═══ Remarks Set the background color (only used if fillBackgound is set TRUE in the constructor) Parameters XColor * color color to fill the background with ═══ 3.49.4. XGraphicDevice::XGraphicDevice ═══ Remarks Constructs a grphic device where objects like XLine, XText etc can be drawn Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * window │window to draw to (if XGraphicDevice is │ │ │not constructed in memory) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL memory │construct in memory (default is FALSE) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL fillBackground │fill the background │ ├────────────────────┼────────────────────────────────────────┤ │LONG resolution │possible values: │ │ │XGRAPH_PELS │ │ │XGRAPH_LOMETRIC │ │ │XGRAPH_HIMETRIC │ │ │XGRAPH_LOENGLISH │ │ │XGRAPH_HIENGLISH │ │ │XGRAPH_TWIPS │ ├────────────────────┼────────────────────────────────────────┤ │LONG mode │mode, see OS/2 API documentation ( │ │ │GPIA_ASSOC and related ) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.49.5. XGraphicDevice::Copy ═══ Remarks Copy the content of one graphic to another Parameters ┌────────────────────┬────────────────────────────────────────┐ │XGraphicDevice * │the source from which to copy │ │source │ │ ├────────────────────┼────────────────────────────────────────┤ │XRect * targetRect │rectangle which defines the target │ ├────────────────────┼────────────────────────────────────────┤ │XRect * sourceRect │rectangle which defines the source │ │ │(default is NULL). If the width of the │ │ │rect is set greater zero, the content │ │ │will be stretched │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.50. XGraphicObject ═══ Overview Functions color  GetColor  SetColor misc  SetPattern  Show position/size  Move ═══ 3.50.1. XGraphicObject overview ═══ Parent class: XObject Overview ═══ 3.50.2. XGraphicObject::GetColor ═══ Remarks Get the current color Parameters XColor * color buffer to hold the color ═══ 3.50.3. XGraphicObject::SetColor ═══ Remarks Set the color Parameters XColor * color the new color ═══ 3.50.4. XGraphicObject::SetPattern ═══ Remarks Set a fill-patern for the object Parameters SHORT patternIndex index of fill-patern (0-255) ═══ 3.50.5. XGraphicObject::Show ═══ Remarks Show/hide the object Parameters BOOL show TRUE=show, FALSE=hide ═══ 3.50.6. XGraphicObject::Move ═══ Remarks Move the object to a new place Parameters XPoint * p point to move to ═══ 3.51. XGroupBox ═══ Overview Functions constructors/destructors  XGroupBox ═══ 3.51.1. XGroupBox overview ═══ Parent class: XStatic Overview ═══ 3.51.2. XGroupBox::XGroupBox ═══ Remarks Constructs a group-box Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the box │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │const char* title │the title of the group-box │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.52. XHandler ═══ Overview Functions  HandleEvent ═══ 3.52.1. XHandler overview ═══ Overview Events like mouse-moving, keyboard input) are typicaly send in the OOL in the form of XEvent and derived classes. Except XControlEvent (see XWindow::DoControl()) this events must be caught with classes derived from XHandler, each of this handlers is corresponding to a special event-class, eg. to catch a XKeyboardEvent you need a XKeyboardHandler. To catch these event you must attach the needed handler to the window from which the events should be caught (see the constructors of the handlers for details). Therefor you have to derive a class from the needed handler and override the member-function HandleEvent(). With your overridden function you catch the events and handle it. Usualy the method HandleEvent() must return a boolean value. The return value indicates if the event can be processed by the operating system (return TRUE) or if the event should not be processed (return FALSE). You can install:  XBackgroundDrawHandler  XContainerHandler  XDragHandler  XKeyboardHandler  XItemDrawHandler  XMouseHandler  XNoteBookHandler  XStyleHandler  XTimer ═══ 3.52.2. XHandler::HandleEvent ═══ Remarks Constructor of XItemDrawHandler Parameters XEvent * event the event-class, in derived classes of XHandler there will be usualy caught events derived from XEvent. Return-Value BOOL TRUE=let the OS handle the event, FALSE=dont let the OS handle the event ═══ 3.53. XHelpInstance ═══ Overview Functions constructors/destructors  XHelpInstance help funcions  ShowHelpContents  ShowHelpForHelp  ShowHelpForId  ShowHelpIndex window functions  AssociateWindow ═══ 3.53.1. XHelpInstance overview ═══ Overview XHelpInstance handles help functions for you. Therefore you have to write your help-text for your controls and give the text the same id (res=XXX in the IPF-file) like you have defined for the requested control. You can associate a XHelpInstance to one ore more framewindows. The help-instance also supports help for a message-box, refer to XMessageBox for details. ═══ 3.53.2. XHelpInstance::XHelpInstance ═══ Remarks Construct a helpinstance Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * path │path for the help-file │ ├────────────────────┼────────────────────────────────────────┤ │char * title │window -title (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │XResource * │resource for the help-table (default is │ │helpTableLib │NULL) │ ├────────────────────┼────────────────────────────────────────┤ │XResourceLibrary * │library for action-bar (defaul tis NULL)│ │actionBarLib │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.53.3. XHelpInstance::ShowHelpContents ═══ Remarks Show the contents ═══ 3.53.4. XHelpInstance::ShowHelpForHelp ═══ Remarks Shows how to use help ═══ 3.53.5. XHelpInstance::ShowHelpForId ═══ Remarks Shows the help for a given ID Parameters LONG id the requested id ═══ 3.53.6. XHelpInstance::ShowHelpIndex ═══ Remarks Shows the index ═══ 3.53.7. XHelpInstance::AssociateWindow ═══ Remarks Associate a dialog with the help-instance Associate a frame-window with the help-instance Parameters XDialog * dialog XFrameWindow * window ═══ 3.54. XIO ═══ Overview Functions I/O  Read  Write misc  GetPointerPos  Seek open/close  Close ═══ 3.54.1. XIO overview ═══ Parent class: XObject Overview ═══ 3.54.2. XIO::Read ═══ Definition Read(PVOID, ULONG) Remarks Read from I/O Read from I/O Read from I/O Read from I/O Read from I/O Read from I/O Read from I/O Parameters XDate& buffer XTime& buffer CHAR& buffer SHORT& buffer LONG& buffer XString& string-buffer ULONG size count of bytes to read PVOID buffer pointer to memory ULONG size count of bytes to read Return-Value ULONG count of bytes which are read ULONG count of bytes which are read ULONG count of bytes which are read ULONG count of bytes which are read ULONG count of bytes which are read ULONG count of bytes which are read ULONG count of bytes which are read ═══ 3.54.3. XIO::Write ═══ Remarks Write a date to I/O Write a time to I/O Write CHAR to I/O Write SHORT to I/O Write LONG to I/O Writes a string to I/O including terminating NULL. Write to I/O Parameters XDate& data in OOL-format XTime& data in OOL-format CHAR data SHORT data LONG data XString& string PVOID buffer pointer to memory ULONG size count of bytes to write Return-Value ULONG count of bytes which are written ULONG count of bytes which are written ULONG count of bytes which are written ULONG count of bytes which are written ULONG count of bytes which are written ULONG count of bytes which are written ULONG count of bytes which are written ═══ 3.54.4. XIO::GetPointerPos ═══ Remarks Returns the position of the file-pointer relative to the beginning of I/O. Before calling this function you must call XIO::Seek()! (e.g. Seek(0, XFILE_CURRENT) ) Return-Value ULONG the position ═══ 3.54.5. XIO::Seek ═══ Remarks Seek in the file Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG position │position to seek to relative to relPos │ ├────────────────────┼────────────────────────────────────────┤ │ULONG relPos │position relative to: │ │ │XFILE_BEGIN relative to the beginning of│ │ │the file (default) │ │ │XFILE_CURRENT relative to current │ │ │position │ │ │XFILE_END relative to the end of the │ │ │file │ └────────────────────┴────────────────────────────────────────┘ Return-Value ULONG count of bytes which are read ═══ 3.54.6. XIO::Close ═══ Remarks Close I/O ═══ 3.55. XItemDrawEvent ═══ Overview Functions  GetWindowHandle colors  SetTextColor comtainer-related functions  GetColumn  GetObject drawing  DrawItem item-related  GetItemHandle  GetItemID misc  GetWindowID ═══ 3.55.1. XItemDrawEvent overview ═══ Parent class: XEvent Overview An XItemDrawEvent is catched with a XItemDrawHandler. This event occures if a listbox, menu or container is set with the style OWNERDRAW. In this case the items must be drwan by the application. ═══ 3.55.2. XItemDrawEvent::GetWindowHandle ═══ Remarks Returns the sytem-define window handle. Return-Value OOL_WINDOWHANDLE handle ═══ 3.55.3. XItemDrawEvent::SetTextColor ═══ Remarks Set the text color for non-selected items Parameters XColor * color new color ═══ 3.55.4. XItemDrawEvent::GetColumn ═══ Remarks Returns the column from which an item must be drawn. Only use this function in container-controls! Return-Value XContainerColumn * the column ═══ 3.55.5. XItemDrawEvent::GetObject ═══ Remarks Returns the object from which an item must be drawn. Only use this function in container-controls! Return-Value XContainerObject * the object ═══ 3.55.6. XItemDrawEvent::DrawItem ═══ Remarks Draws an item using a bitmap and/or text in XListBox, XContainerControl and XMenuBar Parameters ┌────────────────────┬────────────────────────────────────────┐ │XBitmap * bitmap │A bitmap to display (can be NULL) │ ├────────────────────┼────────────────────────────────────────┤ │char * text │Text to display (can be NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL drawOver │If FALSE (default) first the bitmap is │ │ │drawn and the text is drawn right from │ │ │the bitmap. If TRUE, the text is drawn │ │ │over the bitmap. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.55.7. XItemDrawEvent::GetItemHandle ═══ Remarks Returns a handle to the item which must redrawn. Only use this function in listbox-controls! (There you can set the handle with XListBox::SetItemhandle() ) Return-Value ULONG theHandle ═══ 3.55.8. XItemDrawEvent::GetItemID ═══ Remarks Returns the ID of the item to draw. Donяt use this function in container-controls! (use XItemDrawEvent::GetObject() and XItemDrawEvent::GetColumn() to find out what you have to draw ) Return-Value LONG theID ═══ 3.55.9. XItemDrawEvent::GetWindowID ═══ Remarks Returns the ID of the window. Return-Value LONG theID ═══ 3.56. XItemDrawHandler ═══ Overview Functions  XItemDrawHandler ═══ 3.56.1. XItemDrawHandler overview ═══ Parent class: XHandler Overview XItemDrawHandler is used for controls which can draw the items itself, eg. menus or listboxes with the style OWNERDRAW. To do so derive a class from XItemDrawHandler and override the method HandleEvent(). If you catch a XItemDrawEvent you can draw the item by calling XItemDrawEvent::DrawItem(). ═══ 3.56.2. XItemDrawHandler::XItemDrawHandler ═══ Remarks Constructor of XItemDrawHandler Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * w │the window │ ├────────────────────┼────────────────────────────────────────┤ │SHORT itemWidth │the width of the items │ ├────────────────────┼────────────────────────────────────────┤ │SHORT itemHeight │the height of the items │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.57. XJavaApplet ═══ Overview Functions constructors/destructors  XJavaApplet  ~XJavaApplet java/misc  Destroy  Start  Stop ═══ 3.57.1. XJavaApplet overview ═══ Parent class: XObject Overview ═══ 3.57.2. XJavaApplet::XJavaApplet ═══ Remarks The constructor of XJavaApplet initializes a Java applet. Parameters XWindow* owner XRect* rect const char* documentUrl const char* code USHORT id int parmCount const char** parms ═══ 3.57.3. XJavaApplet::~XJavaApplet ═══ Remarks The destructor of XJavaApplet destroys the a Java applet. ═══ 3.57.4. XJavaApplet::Destroy ═══ Remarks Destroys the Java applet. Return-Value An error code is returned; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.57.5. XJavaApplet::Start ═══ Remarks Starts the Java applet. Return-Value An error code is returned; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.57.6. XJavaApplet::Stop ═══ Remarks Stops the Java applet. Return-Value An error code is returned; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.58. XJavaConsoleMessageHandler ═══ Overview Functions java/misc  HideConsole  ShowConsole  ShowMessage ═══ 3.58.1. XJavaConsoleMessageHandler overview ═══ ═══ 3.58.2. XJavaConsoleMessageHandler::HideConsole ═══ Remarks Makes the Java console invisible. Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.58.3. XJavaConsoleMessageHandler::ShowConsole ═══ Remarks Makes the Java console visible. Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.58.4. XJavaConsoleMessageHandler::ShowMessage ═══ Remarks Whenever the Java runtime system passes a string to the console, this function is beeing called. If you want to process console messages, you have to override this function. Parameters XString&msg The console message ═══ 3.59. XJavaEnvironment ═══ Overview Functions constructors/destructors  XJavaEnvironment  ~XJavaEnvironment java/misc  DisplayError  Get  GetMessageHandler  GetProperty  GetShowURLHandler  GetStatusMsgHandler  GetVersion  Iconify  SetMessageHandler  SetProperty  SetShowURLHandler  SetStatusMsgHandler  Uniconify ═══ 3.59.1. XJavaEnvironment overview ═══ Parent class: XObject Overview ═══ 3.59.2. XJavaEnvironment::XJavaEnvironment ═══ Remarks The constructor of XJavaEnvironment initializes the Java virtual machines. Parameters XJavaConsoleMessageHandler* phnd Pointer to a console message handler object; if NULL is passed, then a default message handler is beeing installed. int argc Number of arguments that shall be passed to the Java runtime system. char** argv Array with strings containing the parameters; possible parameters are: -v|-verbose turn on verbose mode -debug enable remote Java debugging -noasyncgc don't allow asynchronous gc's -verbosegc print a message when gc occur -ssnumber set the C stack size of a process -ossnumber set the JAVA stack size of a process -msnumber set the initial Java heap size -mxnumber set the maximum Java heap size -classpath directories separated by semicolons list directories in which to look for classes -prof output profiling data to ./java.prof -verify verify all classes when read in -verifyremote verify classes read in over the network [default] -noverify do not verify any class ═══ 3.59.3. XJavaEnvironment::~XJavaEnvironment ═══ Remarks Constructor for the XJavaEnvironment class. ═══ 3.59.4. XJavaEnvironment::DisplayError ═══ Remarks Opens a message box and displays an error message Parameters int rc Error number; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.5. XJavaEnvironment::Get ═══ Remarks Queries the pointer to the actual Java environment object. Return-Value XJavaEnvironment* pJEnv pointer to the actual Java environment object. ═══ 3.59.6. XJavaEnvironment::GetMessageHandler ═══ Remarks Queries the pointer to the actual console message handler object. Return-Value XJavaConsoleMessageHandler* pMsgHandler Pointer to the actual console message handler object. ═══ 3.59.7. XJavaEnvironment::GetProperty ═══ Remarks Queries a property value from the Java runtime system. Parameters const char* key Name of the key (refer to the Java documentation) char* value Value that the key has int buflen Length of the buffer for the value int* pvallen Real length of the key value Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.8. XJavaEnvironment::GetShowURLHandler ═══ Remarks Queries the pointer to the actual url show handler object. Parameters XWindow* owner Pointer to the window object to which the handler belongs to. Return-Value Pointer to the actual url show handler object. ═══ 3.59.9. XJavaEnvironment::GetStatusMsgHandler ═══ Remarks Queries the pointer to the actual status message handler object. Parameters XWindow* owner Pointer to the window object to which the handler belongs to. Return-Value Pointer to the actual status message handler. ═══ 3.59.10. XJavaEnvironment::GetVersion ═══ Remarks Queries the version of J-Empower. Return-Value int* piMajor The major version number. int* piMinor The Minor version number. An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.11. XJavaEnvironment::Iconify ═══ Remarks Notifies the applets of a window that the window has been minimized. Parameters XWindow* pOwnerWnd - Owner window of the applets Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.12. XJavaEnvironment::SetMessageHandler ═══ Remarks Sets a new console message handler object. Please remember to delete the old message handler object if there is one. Parameters XJavaConsoleMessageHandler* handler pointer to the handler object Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.13. XJavaEnvironment::SetProperty ═══ Remarks Sets a property value of the Java runtime system. Parameters const char* key Name of the key (refer to the Java documentation) char* value New value that the key has Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.14. XJavaEnvironment::SetShowURLHandler ═══ Remarks Sets a new console url show handler object. Please remember to delete the old handler object if there is one. Parameters XWindow* wnd pointer to the window object that holds an applet XJavaShowURLHandler* hnd pointer to the handler object Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.15. XJavaEnvironment::SetStatusMsgHandler ═══ Remarks Sets a new status message handler object. Please remember to delete the old handler object if there is one. Parameters XWindow* wnd pointer to the window object that holds an applet XJavaStatusMsgHandler* hnd pointer to the handler object Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.59.16. XJavaEnvironment::Uniconify ═══ Remarks Notifies the applets of a window that the window has been restored. Parameters XWindow* pOwnerWnd - Owner window of the applets Return-Value An error code is return; possible values are: JAVA_OK no error JAVA_INVALID_APPLET inavlid applet code given JAVA_INVALID_CONTEXT inavlid applet context given JAVA_INVALID_PARAMETER invalid parameter JAVA_ALREADY_INITIALIZED Java runtime system already initialized JAVA_OUT_OF_MEMORY out of memory JAVA_EXCEPTION_OCCURRED Java exception occurred JAVA_NOT_INITIALIZED Java runtime system not initialized JAVA_INTERNAL_ERROR internal Java error ═══ 3.60. XJavaShowURLHandler ═══ Overview Variables constructors/destructors  XJavaShowURLHandler  ~XJavaShowURLHandler java/misc  ShowURL ═══ 3.60.1. XJavaShowURLHandler overview ═══ ═══ 3.60.2. XJavaShowURLHandler::XJavaShowURLHandler ═══ ═══ 3.60.3. XJavaShowURLHandler::~XJavaShowURLHandler ═══ ═══ 3.60.4. XJavaShowURLHandler::ShowURL ═══ Remarks You have to override this abstract funtion in order to handle the URLs that are passed to this function Parameters XString&url the applet URL XString&target the applet target ═══ 3.61. XJavaStatusMsgHandler ═══ Overview Variables constructors/destructors  XJavaStatusMsgHandler  ~XJavaStatusMsgHandler java/misc  ShowStatusMessage ═══ 3.61.1. XJavaStatusMsgHandler overview ═══ ═══ 3.61.2. XJavaStatusMsgHandler::XJavaStatusMsgHandler ═══ ═══ 3.61.3. XJavaStatusMsgHandler::~XJavaStatusMsgHandler ═══ ═══ 3.61.4. XJavaStatusMsgHandler::ShowStatusMessage ═══ Remarks You have to override this abstract funtion in order to handle the status messages that are passed to this function Parameters XString&message a status message ═══ 3.62. XKeyboardEvent ═══ Overview Functions  GetFlags  GetScanCode  GetVirtualKey ═══ 3.62.1. XKeyboardEvent overview ═══ Parent class: XEvent Overview A XKeyboardEvent represents a user input to the keyboard, to catch these events install a XKeyboardHandler. XKeyboardEvent::GetEventID() returns the ASCII-code of the key which was pressed, with XKeyboardEvent::GetVirtualKey() and XKeyboardEvent::GetScanCode() you receivemore information. ═══ 3.62.2. XKeyboardEvent::GetFlags ═══ Remarks Use this function to get the flags Return-Value SHORT flags: ┌────────────────────┬────────────────────────────────────────┐ │XKC_KEYUP │The event is a key-up transition │ ├────────────────────┼────────────────────────────────────────┤ │XKC_PREVDOWN │The key has been previously down │ ├────────────────────┼────────────────────────────────────────┤ │XKC_LONEKEY │Indicates if the key is pressed and │ │ │released without any other keys │ ├────────────────────┼────────────────────────────────────────┤ │XKC_SHIFT │The SHIFT state is active │ ├────────────────────┼────────────────────────────────────────┤ │XKC_ALT │The ALT state is active │ ├────────────────────┼────────────────────────────────────────┤ │XKC_CTRL │The CTRL state was active │ └────────────────────┴────────────────────────────────────────┘ This values can be or-ed. ═══ 3.62.3. XKeyboardEvent::GetScanCode ═══ Remarks Use this function to get the scancode Return-Value SHORT code ═══ 3.62.4. XKeyboardEvent::GetVirtualKey ═══ Remarks Use this function to get the virtual key defined by the OS Return-Value SHORT key virtual key, see OS/2-information ═══ 3.63. XKeyboardHandler ═══ Overview Functions  XKeyboardHandler ═══ 3.63.1. XKeyboardHandler overview ═══ Parent class: XHandler Overview To catch events from the keyboard you must register a XKeyboardHandler. Therefor you derive a class from XKeyboardHandler and override the method HandleEvent() where you will get events (XKeyboardEvent) posted from the mouse. ═══ 3.63.2. XKeyboardHandler::XKeyboardHandler ═══ Parameters XWindow * window The window to handle the keyboard-events for. ═══ 3.64. XLED ═══ Overview Functions  Enable ═══ 3.64.1. XLED overview ═══ Parent class: XUserWindow Overview XLED is a class which creates a window that looks like a LED For applications which use XLED it is nessecary that the OOL-resourcelibrary OOLRES.DLL is in the libpath. ═══ 3.64.2. XLED::Enable ═══ Remarks Enable/Disable the LED Parameters BOOL TRUE=enable, FALSE=disable, default is TRUE ═══ 3.65. XLayer ═══ Overview Functions Add/Remove objects  AddObject  Empty  RemoveObject ═══ 3.65.1. XLayer overview ═══ Parent class: XObject Overview XLayer is a class which can store a large amount of graphic-objects. Call AddObject() to add objects to the layer, with Draw you can draw the content on a graphic device like XGraphicDevice or XPrinterDevice ═══ 3.65.2. XLayer::AddObject ═══ Remarks Adds an object Parameters XGraphicObject * the object to add ═══ 3.65.3. XLayer::Empty ═══ Remarks Removes all objects Parameters BOOL destroyAll TRUE=call delete for all objects, FALSE=dont destroy, default is TRUE ═══ 3.65.4. XLayer::RemoveObject ═══ Remarks Removes an object Parameters XGraphicObject * the object to add BOOL destroyObject TRUE=call delete, FALSE=dont destroy, default is TRUE ═══ 3.66. XLine ═══ Overview Functions constructors/destructors  XLine settings  SetLineEnd  SetLineJoin  SetLineType  SetLineWidth ═══ 3.66.1. XLine overview ═══ Parent class: XGraphicObject Overview ═══ 3.66.2. XLine::XLine ═══ Remarks Construct a line object Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * p1 │start point │ ├────────────────────┼────────────────────────────────────────┤ │XPoint * p2 │end point │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.66.3. XLine::SetLineEnd ═══ Remarks Set the type of line ending. Parameters CHAR type ═══ 3.66.4. XLine::SetLineJoin ═══ Remarks Set the tStart(); Parent class: XDialog Overview ═══ 3.77.2. XModalDialog::XModalDialog ═══ Remarks Construct a modal dialog. You must call XModalDialog::Start() after constructing an instance to make the dialog work. When constructing the dialog you can initialize the dialog controls. Construct a modal dialog. You must call XModalDialog::Start() after constructing an instance to make the dialog work. When constructing the dialog you can initialize the dialog controls. Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │ID of the dialog template. The │ │ │dialog-resources must be linked to the │ │ │exe-file. │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │A pointer to the owner-window. If now │ │ │owner is given an error occures. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE=show centered │ │ │FALSE=not centered │ │ │(default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XResource * │A resource which describes the dialog │ │ │template │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │A pointer to the owner-window. If now │ │ │owner is given an error occures. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE=show centered │ │ │FALSE=not centered │ │ │(default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.77.3. XModalDialog::Start ═══ Remarks To make a modal dialog work you must call Start(). this functions returns the value of the last command. Return-Value LONG command-value, -1 if the dialog was closed with the system-menu Example XModalDialog * dlg = new XModalDialog(...) int command = dlg->Start(); . ═══ 3.78. XModelessDialog ═══ Overview Functions constructors/destructors  XModelessDialog ═══ 3.78.1. XModelessDialog overview ═══ Parent class: XDialog Overview ═══ 3.78.2. XModelessDialog::XModelessDialog ═══ Remarks Construct a modeless dialog. Construct a modeless dialog. Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │ID of the dialog template, the │ │ │dialog-resources mus be linked to the │ │ │exe-file │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │a pointer to the owner-window (can be │ │ │NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE=show centered │ │ │FALSE=not centered │ │ │(default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XResource * │a resource which describes the dialog │ │ │template │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │a pointer to the owner-window (can be │ │ │NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE=show centered │ │ │FALSE=not centered │ │ │(default is TRUE) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.79. XMouseEvent ═══ Overview Functions  GetEventID  GetKeyInfo ═══ 3.79.1. XMouseEvent overview ═══ Parent class: XEvent Overview To catch events from the mouse like moving using mouse-buttons etc you must install a XMouseHandler. If you use this handler you recieve XMouseEvents which contains information about the mouse-state. For drag/drop you donяt need a XMousehandler but a XDragHandler. Possible event-IDs are ┌────────────────────┬────────────────────────────────────────┐ │MOU_BTN1CLICK │button 1 clicked │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN1DBLCLICK │button 1 double-click │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN1DOWN │button 1 down │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN1UP │button 1 up │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN2CLICK │button 2 clicked │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN2DBLCLICK │button 2 double-click │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN2DOWN │button 2 down │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN2UP │button 2 up │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN3CLICK │button 3 clicked │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN3DBLCLICK │button 3 double-click │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN3DOWN │button 3 down │ ├────────────────────┼────────────────────────────────────────┤ │MOU_BTN3UP │button 3 up │ ├────────────────────┼────────────────────────────────────────┤ │MOU_INITDRAG │the user requested a drag-operation │ ├────────────────────┼────────────────────────────────────────┤ │MOU_MOVE │mouse moved │ ├────────────────────┼────────────────────────────────────────┤ │MOU_ENTER │mouse entered the window (Warp 4) │ ├────────────────────┼────────────────────────────────────────┤ │MOU_EXIT │mouse leaves the window (Warp 4) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.79.2. XMouseEvent::GetEventID ═══ Remarks Returns the ID of the mouse-event. To get a mouse-event you must register a XMouseHandler! Return-Value LONG theID the ID of the mouse-event, see XMouseEvent. ═══ 3.79.3. XMouseEvent::GetKeyInfo ═══ Remarks Returns the state of the keyboard Return-Value SHORT keyInfo information of the keyboard ═══ 3.80. XMouseHandler ═══ Overview Functions  XMouseHandler ═══ 3.80.1. XMouseHandler overview ═══ Parent class: XHandler Overview To catch events from the mouse like moving using mouse-buttons etc you must register a XMouseHandler. Therefor you derive a class from XMouseHandler and override the method HandleEvent() where you will get events (XMouseEvent) posted from the mouse. ═══ 3.80.2. XMouseHandler::XMouseHandler ═══ Parameters XWindow * window The window to handle the mouseevents for. ═══ 3.81. XMultiLineEdit ═══ Overview Functions clipboard functions and selection  Clear  Copy  Cut  GetSelection  Paste  SelectText constructors/destructors  XMultiLineEdit line related functions  GetLineCount  GetLineFromChar  GetLineLength  GetLineStart misc  EnableOverWrite  EnableRefresh  GetFirstChar  GetTextLength  InsertString  IsChanged  IsReadOnly  Search  SetLimit  SetReadOnly  ShowFirstChar undo  CanUndo  ResetUndo  Undo wrap  EnableWrap  IsWrap ═══ 3.81.1. XMultiLineEdit overview ═══ Parent class: XControl Overview ═══ 3.81.2. XMultiLineEdit::Clear ═══ Remarks Clears marked text ═══ 3.81.3. XMultiLineEdit::Copy ═══ Remarks Copy marked text ═══ 3.81.4. XMultiLineEdit::Cut ═══ Remarks Cut marked text ═══ 3.81.5. XMultiLineEdit::GetSelection ═══ Remarks Query the boundarys of the current selection Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG& │starting point of selection │ ├────────────────────┼────────────────────────────────────────┤ │LONG& │end point │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.81.6. XMultiLineEdit::Paste ═══ Remarks Paste text from the clipboard ═══ 3.81.7. XMultiLineEdit::SelectText ═══ Remarks Marks an area of text Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG │begin of marking-area │ ├────────────────────┼────────────────────────────────────────┤ │LONG │end of marking-area │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.81.8. XMultiLineEdit::XMultiLineEdit ═══ Remarks Constructs an XMultiLineEdit Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the XMultiLineEdit │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ ├────────────────────┼────────────────────────────────────────┤ │MLE_BORDER │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_READONLY │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_WORDWRAP │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_HORZSCROLL │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_VERTSCROLL │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_IGNORETAB │ │ ├────────────────────┼────────────────────────────────────────┤ │MLE_DISABLEUNDO │ │ └────────────────────┴────────────────────────────────────────┘ (can be or-ed) const char * string text to display ═══ 3.81.9. XMultiLineEdit::GetLineCount ═══ Remarks Query the number of lines Return-Value LONG lines ═══ 3.81.10. XMultiLineEdit::GetLineFromChar ═══ Remarks Query the line number of the point given in parameter 1 Parameters LONG index Return-Value LONG line-number ═══ 3.81.11. XMultiLineEdit::GetLineLength ═══ Remarks Query the length of the line which contains the point given in parameter 1 Parameters LONG index Return-Value LONG length of the line ═══ 3.81.12. XMultiLineEdit::GetLineStart ═══ Remarks Query the starting point of the line given in parameter 1 Parameters LONG line-number Return-Value LONG point of begining ═══ 3.81.13. XMultiLineEdit::EnableOverWrite ═══ Remarks Enables/disables overwrite-mode Parameters BOOL overwrite TRUE=overWrite, FALSE=disable overWrite ═══ 3.81.14. XMultiLineEdit::EnableRefresh ═══ Remarks Enable/disable window-refresh Parameters BOOL enable TRUE=enable, FALSE=disable refresh ═══ 3.81.15. XMultiLineEdit::GetFirstChar ═══ Remarks Query the number of the first visible char Return-Value LONG number ═══ 3.81.16. XMultiLineEdit::GetTextLength ═══ Remarks Returns the length of the text in the MLE including linebreaks (\n) Return-Value LONG length ═══ 3.81.17. XMultiLineEdit::InsertString ═══ Remarks Insert a string at the current cursor-position Parameters const char * text to insert ═══ 3.81.18. XMultiLineEdit::IsChanged ═══ Remarks Query if the content has changed Return-Value BOOL result ═══ 3.81.19. XMultiLineEdit::IsReadOnly ═══ Remarks Query if readonly-mode is active Return-Value BOOL result ═══ 3.81.20. XMultiLineEdit::Search ═══ Remarks Search and/or replace strings in the text (see XMLESearch for details) Parameters XMLESearch * searchClass pointer to an initialized instance of XMLESearch Return-Value BOOL result ═══ 3.81.21. XMultiLineEdit::SetLimit ═══ Remarks Set maximum number of charakters Parameters LONG maximum size ═══ 3.81.22. XMultiLineEdit::SetReadOnly ═══ Remarks Enable/disable readonly-mode Parameters BOOL readOnly TRUE=enable, FALSE=disable readonly-mode ═══ 3.81.23. XMultiLineEdit::ShowFirstChar ═══ Remarks Select the point of the text to start displaying Parameters LONG the first char to display ═══ 3.81.24. XMultiLineEdit::CanUndo ═══ Remarks Query if an undo-operation is possible Return-Value BOOL result ═══ 3.81.25. XMultiLineEdit::ResetUndo ═══ Remarks Reset the undo-buffer ═══ 3.81.26. XMultiLineEdit::Undo ═══ Remarks Undo the last action Return-Value BOOL result ═══ 3.81.27. XMultiLineEdit::EnableWrap ═══ Remarks Enable/disable word-wrap Parameters BOOL wrap TRUE=enable, FALSE=disable word-wrap ═══ 3.81.28. XMultiLineEdit::IsWrap ═══ Remarks Query if word-wrap is active Return-Value BOOL result ═══ 3.82. XMutexSemaphore ═══ Overview Functions constructors/destructors  XMutexSemaphore misc  Close  Release  Request ═══ 3.82.1. XMutexSemaphore overview ═══ Parent class: XSemaphore Overview ═══ 3.82.2. XMutexSemaphore::XMutexSemaphore ═══ Remarks Open a XMutexSemaphore Create a XMutexSemaphore Parameters char * name name of the semaphore WITHOUT leading '\\SEM32' ┌────────────────────┬────────────────────────────────────────┐ │char * name │name of the semaphore WITHOUT leading │ │ │'\\SEM32' │ ├────────────────────┼────────────────────────────────────────┤ │BOOL shared │if shared or not │ ├────────────────────┼────────────────────────────────────────┤ │BOOL owned │TRUE=initial state is owned │ │ │FALSE=initial state is not owned │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XSemaphoreException is thrown If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.82.3. XMutexSemaphore::Close ═══ Remarks Crlose a XMutexSemaphore Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.82.4. XMutexSemaphore::Release ═══ Remarks Release a XMutexSemaphore, the next semaphore get access. Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.82.5. XMutexSemaphore::Request ═══ Remarks Request a semaphore. Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG timeout │-1=wait endless │ │ │ 0 = return at once │ │ │ other=time to wait max. (in │ │ │milliseconds) │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XSemaphoreException is thrown ═══ 3.83. XNamedPipeClient ═══ Overview Functions misc  WaitForServer open/close  Open ═══ 3.83.1. XNamedPipeClient overview ═══ Parent class: XIO Overview ═══ 3.83.2. XNamedPipeClient::WaitForServer ═══ Remarks Wait for a server Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * name │name of the requested pipe (without │ │ │leading '\\PIPE\\') │ ├────────────────────┼────────────────────────────────────────┤ │ULONG timeOut │how long to wait │ ├────────────────────┼────────────────────────────────────────┤ │char * server │name of the server-maschine if the pipe │ │ │is not on the local maschine │ │ │(default is NULL) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.83.3. XNamedPipeClient::Open ═══ Remarks Opens a connection, after it is open call WaitForServer() Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * name │name of the requested pipe (without │ │ │leading '\\PIPE\\' │ ├────────────────────┼────────────────────────────────────────┤ │ULONG modeOpen │mode to open (see XFile::Open() for │ │ │possible modes │ ├────────────────────┼────────────────────────────────────────┤ │char * server │name of the server-maschine if the pipe │ │ │is not on the local maschine │ │ │(default is NULL) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.84. XNamedPipeServer ═══ Overview Functions misc  GetState open/close  Connect  DisConnect  Open ═══ 3.84.1. XNamedPipeServer overview ═══ Parent class: XIO Overview ═══ 3.84.2. XNamedPipeServer::GetState ═══ Remarks Query the state of a pipeserver Return-Value ┌────────────────────┬────────────────────────────────────────┐ │LONG state │possible values: │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_STATE_DISCONN│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_STATE_LISTENI│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_STATE_CONNECT│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_STATE_CLOSING│ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.84.3. XNamedPipeServer::Connect ═══ Remarks Wait for a client ═══ 3.84.4. XNamedPipeServer::DisConnect ═══ Remarks Frees a pipe when a client has stoped data-transfer ( if GetState() returns XNPIPE_STATE_CLOSING). After DisConnect() you can call Connect() to wait for the next client or Close(). ═══ 3.84.5. XNamedPipeServer::Open ═══ Remarks Open a pipe, after you have opened it call Connect() Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * name │pipename, without leading '\\PIPE\\' │ ├────────────────────┼────────────────────────────────────────┤ │ULONG openMode │mode to open (see OS/2 docs): │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_ACCESS_INBOUN│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_ACCESS_OUTBOU│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_ACCESS_DUPLEX│ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_INHERIT │ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_NOINHERIT │ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_WRITEBEHIND │ │ ├────────────────────┼────────────────────────────────────────┤ │XNPIPE_NOWRITEBEHIND│ │ └────────────────────┴────────────────────────────────────────┘ ULONG pipeMode mode of data-transfer: ┌────────────────────────────────────────┐ │XNPIPE_READMODE_BYTE │ ├────────────────────────────────────────┤ │XNPIPE_READMODE_MESSAGE │ ├────────────────────────────────────────┤ │XNPIPE_TYPE_BYTE │ ├────────────────────────────────────────┤ │XNPIPE_TYPE_MESSAGE │ ├────────────────────────────────────────┤ │XNPIPE_WAIT │ ├────────────────────────────────────────┤ │XNPIPE_NOWAIT │ └────────────────────────────────────────┘ char pipeCount maximum instances of pipe-servers, -1 = unlimited (default is 1) ULONG outSize size of write-buffer ULONG inSize size of read-buffer ULONG timeOut time to wait for clients ═══ 3.85. XNoteBook ═══ Overview Functions  GetPage  RemovePage colors  GetBackgroundColor  SetBackgroundColor  SetMajorBackgroundColor  SetMajorForegroundColor  SetMinorBackgroundColor  SetMinorForegroundColor constructors/destructors  XNoteBook misc  CalcClientRect  GetPageCount size  SetMajorTabSize  SetMinorTabSize ═══ 3.85.1. XNoteBook overview ═══ Parent class: XControl Overview ═══ 3.85.2. XNoteBook::GetPage ═══ Remarks Retrieve a page from th notebook Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT │order of searching │ ├────────────────────┼────────────────────────────────────────┤ │BKA_FIRST │ │ ├────────────────────┼────────────────────────────────────────┤ │BKA_NEXT │ │ ├────────────────────┼────────────────────────────────────────┤ │BKA_PREV │ │ ├────────────────────┼────────────────────────────────────────┤ │BKA_LAST │ │ ├────────────────────┼────────────────────────────────────────┤ │BKA_TOP │ │ └────────────────────┴────────────────────────────────────────┘ ULONG ID of a relative page. This id is not the window-ID, this ID is automatical created from the operating system, you can get this ID with XNoteBookPage::GetID(). Return-Value XNoteBookPage* pointer to the page Example //how to enumerate all pages XNoteBookPage * last = NULL, * page = noteBook->GetPage( BKA_FIRST ); while( page ) { last = page; page = noteBook->GetPage( BKA_NEXT, last->GetID()); }; . ═══ 3.85.3. XNoteBook::RemovePage ═══ Remarks Remove a page from the notebook Parameters XNoteBookPage* thePage Return-Value BOOL success ═══ 3.85.4. XNoteBook::GetBackgroundColor ═══ Remarks Returns the background color. Parameters XColor * buffer buffer to hold the data ═══ 3.85.5. XNoteBook::SetBackgroundColor ═══ Remarks Set the background color. Parameters XColor * color the new color ═══ 3.85.6. XNoteBook::SetMajorBackgroundColor ═══ Remarks Set the background color of major tabs. Parameters XColor * theColor ═══ 3.85.7. XNoteBook::SetMajorForegroundColor ═══ Remarks Set the foreground color of major tabs. Parameters XColor * theColor ═══ 3.85.8. XNoteBook::SetMinorBackgroundColor ═══ Remarks Set the backgroundcolor of minor tabs. Parameters XColor * theColor ═══ 3.85.9. XNoteBook::SetMinorForegroundColor ═══ Remarks Set the foreground color of minor tabs. Parameters XColor * theColor ═══ 3.85.10. XNoteBook::XNoteBook ═══ Remarks Create a notebook Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner-window │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │size and position │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │ID of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style of the notebook, valid values are:│ ├────────────────────┼────────────────────────────────────────┤ │NB_BACKPAGESBR │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_BACKPAGESBL │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_BACKPAGESTR │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_BACKPAGESTL │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_MAJORTABRIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_MAJORTABLEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_MAJORTABTOP │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_MAJORTABBOTTOM │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_SQUARETABS │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_ROUNDEDTABS │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_POLYGONTABS │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_SOLIDBIND │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_SPIRALBIND │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_STATUSTEXTLEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_STATUSTEXTRIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_STATUSTEXTCENTER │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_TABTEXTLEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_TABTEXTRIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_TABTEXTCENTER │ │ ├────────────────────┼────────────────────────────────────────┤ │NB_TABBEDDIALOG │ │ │(Warp4 only) │ │ └────────────────────┴────────────────────────────────────────┘ (can be or-ed, default is NB_SOLIDBIND|NB_BACKPAGESBR|NB_SQUARETABS|NB_TABTEXTCENTER|NB_STATUSTEXTLEFT) char * font font to use, eg "8.Helv" (default is NULL) ═══ 3.85.11. XNoteBook::CalcClientRect ═══ Remarks Calculate the client-region of the notebook. Parameters XRect * buffer ═══ 3.85.12. XNoteBook::GetPageCount ═══ Remarks Returns the count of pages. Return-Value SHORT numberOfPages ═══ 3.85.13. XNoteBook::SetMajorTabSize ═══ Remarks Set the size of major tabs. Parameters SHORT width SHORT hight ═══ 3.85.14. XNoteBook::SetMinorTabSize ═══ Remarks Set the size of minor tabs. Parameters SHORT width SHORT hight ═══ 3.86. XNoteBookEvent ═══ Overview Functions  GetPage ═══ 3.86.1. XNoteBookEvent overview ═══ Parent class: XEvent Overview XNoteBookEvent is posted for event in a XNoteBook. Possible event-idяs are:  XNOTEBOOK_PAGESELECTED  XNOTEBOOK_PAGESELECTEDPENDING  XNOTEBOOK_HELP  XNOTEBOOK_PAGEDELETED  XNOTEBOOK_NEWPAGESIZE Except of the case XNOTEBOOK_NEWPAGESIZE you can retrieve the depending notebook-page by calling XNoteBookPage::GetPage(). ═══ 3.86.2. XNoteBookEvent::GetPage ═══ Remarks Retrive the related page Return-Value XNoteBookPage* pointer to the page (can be NULL) ═══ 3.87. XNoteBookHandler ═══ Overview Functions  XNoteBookHandler ═══ 3.87.1. XNoteBookHandler overview ═══ Parent class: XHandler Overview To catch events from a notebook you need to derive a class from XNoteBookHandler and override the method HandleEvent where you will get the events. ═══ 3.87.2. XNoteBookHandler::XNoteBookHandler ═══ Parameters XNoteBook * window The window to handle the events for. ═══ 3.88. XNoteBookPage ═══ Overview Functions colors  GetBackgroundColor contructors/destructors  XNoteBookPage misc  GetPageCount  SetTop text functions  SetBitmap  SetStatusText  SetText ═══ 3.88.1. XNoteBookPage overview ═══ Parent class: XWindow Overview XNoteBookPage is a page of XNoteBook. You can add one ore more pages to a notebook. The behaviour of a XNoteBookPage is like any other window so you can use all functions like DoCommand, DoControl etc. ═══ 3.88.2. XNoteBookPage::GetBackgroundColor ═══ Remarks Returns the background color. Parameters XColor * buffer ═══ 3.88.3. XNoteBookPage::XNoteBookPage ═══ Remarks Construct a notebook-page and adds it to a given notebook Construct a notebook-page and adds it to a given notebook Parameters ┌────────────────────┬────────────────────────────────────────┐ │XNoteBook * notebook│notebook which gets the page │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │page-id │ ├────────────────────┼────────────────────────────────────────┤ │USHORT style │style of the page: │ │ │BP_MAJORTAB │ │ │BP_MINORTAB │ │ │BP_PAGEBUTTON │ │ │BP_STATUSTEXTON │ │ │BP_MAJOR │ │ │BP_MINOR │ │ │(can be or-ed, default is │ │ │BP_MAJOR|BP_STATUSTEXTON) │ ├────────────────────┼────────────────────────────────────────┤ │USHORT order │where to insert: │ │ │BP_LAST │ │ │BP_FIRST │ │ │BP_NEXT │ │ │BP_PREV │ │ │BP_TOP │ │ │ if BP_LAST or BP_FIRST, insertBehind is│ │ │ignored (default BP_LAST) │ ├────────────────────┼────────────────────────────────────────┤ │XNoteBookPage * │insert behind this page (default is │ │insertBehind │NULL) │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │TRUE=build from resource-dialog │ │ │FALSE=donяt build │ │ │If TRUE the dialog-resource must be │ │ │linked to the exe-file and have the id │ │ │given in pageID. (default is FALSE) │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XNoteBook * notebook│notebook which gets the page │ ├────────────────────┼────────────────────────────────────────┤ │XResource * resource│Give here a XResource which contains the│ │ │id of the dialog to load and the │ │ │resourcelibrary where to load the │ │ │dialog from. If you have created one or │ │ │more pages from resources, you should │ │ │resize the notebook. │ ├────────────────────┼────────────────────────────────────────┤ │USHORT style │style of the page: │ │ │BP_MAJORTAB │ │ │BP_MINORTAB │ │ │BP_PAGEBUTTON │ │ │BP_STATUSTEXTON │ │ │BP_MAJOR │ │ │BP_MINOR │ │ │(can be or-ed, default is │ │ │BP_MAJOR|BP_STATUSTEXTON) │ ├────────────────────┼────────────────────────────────────────┤ │USHORT order │where to insert: │ │ │BP_LAST │ │ │BP_FIRST │ │ │BP_NEXT │ │ │BP_PREV │ │ │BP_TOP │ │ │ if BP_LAST or BP_FIRST, insertBehind is│ │ │ignored (default BP_LAST) │ ├────────────────────┼────────────────────────────────────────┤ │XNoteBookPage * │insert behind this page (default is │ │insertBehind │NULL) │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XException is thrown. If the method fails an exception of the type XException is thrown. ═══ 3.88.4. XNoteBookPage::GetPageCount ═══ Remarks Returns the count of minor-pages behind this page up to the next major-page Return-Value SHORT numberOfPages ═══ 3.88.5. XNoteBookPage::SetTop ═══ Remarks Set the page to the top of the notebook ═══ 3.88.6. XNoteBookPage::SetBitmap ═══ Remarks Set the bitmap of the tab Parameters XBitmap * bitmap the bitmap to display ═══ 3.88.7. XNoteBookPage::SetStatusText ═══ Remarks Set the text of the status-line (if the page has one) Parameters char * text the text to display ═══ 3.88.8. XNoteBookPage::SetText ═══ Remarks Set the text of the tab Parameters char * text the text to display ═══ 3.89. XObject ═══ Overview ═══ 3.89.1. XObject overview ═══ Overview The base of the Open Object Library ═══ 3.90. XPMThread ═══ Overview Functions constructors/destructors  XPMThread ═══ 3.90.1. XPMThread overview ═══ Parent class: XThread Overview ═══ 3.90.2. XPMThread::XPMThread ═══ Remarks Contructs a thread which have access to windows. After a thread is constructed, call Run() to make the thread work. You must override method XThread::Init() where you can construct windows and so on. Init() is the funcion where you enter the thread and have full controll of it. To stop the thread call Terminate(). ═══ 3.91. XPipe ═══ Overview Functions misc  DuplicateHandle  GetReadHandle  GetWriteHandle open/close  Close  CloseHandle  Open ═══ 3.91.1. XPipe overview ═══ Parent class: XIO Overview XPipe is a class which provides data-communication between related processes. Therefore you redirect stdin/stdout/stderr to a pipes read- and/or write-handle(s) of the server and client process. The client must be a client-process (see OS/2-docs for details). To do realy client/server data-communication use DDE (class XDDE) or named pipes (XNamedPipeServer, XNamedPipeClient). Example::xmp. ULONG hfSave, hfNew = XPIPE_STDERROR; //save stderror-handle XPipe::DuplicateHandle( XPIPE_STDERROR, hfSave); //create a pipe and open it XPipe pipe; pipe.Open(); //set the write-handle from the pipe as stderror so the client will write to it XPipe::DuplicateHandle( pipe1.GetWriteHandle(), hfNew); //start the client-process here XProcess::ExecuteProg(.......); //close write-handle of the pipe XPipe::CloseHandle( pipe.GetWriteHandle()); //bring the saved handde from stderror back XPipe::DuplicateHandle( hfSave, hfNew); //close stderror XPipe::CloseHandle(hfSave); ULONG cbRead; char buffer[XPIPE_DEFAULTSIZE]; do { //read data like a file cbRead = pipe.Read( achBuf, XPIPE_DEFAULTSIZE); } while(cbRead); ═══ 3.91.2. XPipe::DuplicateHandle ═══ Remarks Dupplicate a handle. ═══ 3.91.3. XPipe::GetReadHandle ═══ Remarks Returns the read-handle from a pipe Return-Value ULONG readHandle ═══ 3.91.4. XPipe::GetWriteHandle ═══ Remarks Returns the write-handle from a pipe Return-Value ULONG writeHandle ═══ 3.91.5. XPipe::Close ═══ Remarks Close the pipe. ═══ 3.91.6. XPipe::CloseHandle ═══ Remarks Close a single handle. Parameters ULONG handle handle to close. ═══ 3.91.7. XPipe::Open ═══ Remarks Opens a pipe. Afte it is open you can redirect stdin/stdout/stderr to one of its handles. Parameters LONG buffersize size of the buffer (default is 4096) ═══ 3.92. XPoint ═══ Overview Functions  GetX  GetY  SetX  SetY  XPoint ═══ 3.92.1. XPoint overview ═══ Parent class: XObject Overview ═══ 3.92.2. XPoint::GetX ═══ Remarks Query the x-position Return-Value LONG xPosition ═══ 3.92.3. XPoint::GetY ═══ Remarks Query the y-position Return-Value LONG yPosition ═══ 3.92.4. XPoint::SetX ═══ Remarks Set the x-position Parameters LONG xPosition ═══ 3.92.5. XPoint::SetY ═══ Remarks Set the y-position Parameters LONG yPosition ═══ 3.92.6. XPoint::XPoint ═══ Remarks Construct a coordinate Parameters LONG xPosition LONG yPosition ═══ 3.93. XPopupMenu ═══ Overview Functions  Display  XPopupMenu ═══ 3.93.1. XPopupMenu overview ═══ Parent class: XMenu Overview ═══ 3.93.2. XPopupMenu::Display ═══ Remarks shows a created popup-menu Parameters ┌────────────────────┬────────────────────────────────────────┐ │XPoint * point │The point where to show the menu in │ │ │window-coordinates of the owner │ ├────────────────────┼────────────────────────────────────────┤ │USHORT defID │The default-menuitem to display under │ │ │the mouse. (default is 0) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │Style to display the menu │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.93.3. XPopupMenu::XPopupMenu ═══ Remarks Creates a popup-menu, to show it call XPopupMenu::Display() Creates a popup-menu, to show it call XPopupMenu::Display() Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │ID of the resource │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │the owner-window │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XResource * │the resource which defines the menu │ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │the owner-window │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.94. XPrinterDevice ═══ Overview Functions  ClosePrinterJob  KillPrinterJob  NewPage  OpenPrinterJob  SetupPrinter  XPrinterDevice ═══ 3.94.1. XPrinterDevice overview ═══ Parent class: XGraphicDevice Overview XPrinterDevice gives you the capability to print. It is derived from XGraphicDevice, you can draw text or graphic objects like on XGraphicDevice. For printing a dialog is displayed, this dialog is displayed with local language support (currently only italic, francais, english and german). For applications which use XPrinterDevice it is nessacary that the OOL-resourcelibrary OOLRES.DLL is in the libpath. To print follow these sample: XPrinterDevice printer(this); //this is a pointer to the owner-window XString queue, fileName; //setup the printer if( printer.SetupPrinter("Print", this, == FALSE) return FALSE; //open a printer-job if( printer.OpenPrinterJob( "Test Job") == FALSE) { XMessageBox( "error, cannot create printer-job" ); return FALSE; } XSize size; //query the size of the used sheet printer.GetPageSize( ); //create a bitmap to draw XPoint rp( 300, 1500); XBitmap * bmp = new XBitmap( bmp->Load( "sample.bmp" ); bmp->Draw( //close the job printer.ClosePrinterJob( ); If you need to draw multiple pages you need to follow this example: if( newPage) { priner.NewPage(); //add a new page } //continue here with drawing objects ═══ 3.94.2. XPrinterDevice::ClosePrinterJob ═══ Remarks Close the job so it can be printed. ═══ 3.94.3. XPrinterDevice::KillPrinterJob ═══ Remarks Remove the printer job from the printer queue. ═══ 3.94.4. XPrinterDevice::NewPage ═══ Remarks Add a new page to the printer-job. Return-Value BOOL success ═══ 3.94.5. XPrinterDevice::OpenPrinterJob ═══ Remarks Open a printer job Parameters char * title title of the printer job Return-Value TRUE ═══ 3.94.6. XPrinterDevice::SetupPrinter ═══ Remarks Let the user select the printer-queue in a dialog. The dialog is loaded from OOLRES.DLL which must be installed. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char *title │the title of the dialog │ ├────────────────────┼────────────────────────────────────────┤ │XFrameWindow * owner│owner window. If NULL, the dialog for │ │ │the printer-setup is not opened and the│ │ │queue given in parameter 3 is │ │ │initialized directly │ ├────────────────────┼────────────────────────────────────────┤ │XString * queueName │default queue-name (can be null) │ ├────────────────────┼────────────────────────────────────────┤ │XString * fileName │buffer for a fileName if the user wants │ │ │to print to a file (if NULL no fiflename│ │ │is stored) │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.94.7. XPrinterDevice::XPrinterDevice ═══ Remarks Create a printer-device Parameters XFrameWindow * owner-window LONG resolution see XGraphicDevice::XGraphicDevice() for details Return-Value TRUE ═══ 3.95. XProcess ═══ Overview Functions misc  Beep  ExecuteProg  ScanEnvironment  Sleep ═══ 3.95.1. XProcess overview ═══ Parent class: XObject Overview ═══ 3.95.2. XProcess::Beep ═══ Remarks Make some noise Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG frequency │frequency in hertz │ ├────────────────────┼────────────────────────────────────────┤ │LONG duration │duration in milliseconds │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.95.3. XProcess::ExecuteProg ═══ Remarks Executes a program Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * path │path/file to execute │ ├────────────────────┼────────────────────────────────────────┤ │char * args │arguments (can be NULL) │ ├────────────────────┼────────────────────────────────────────┤ │char * environment │enviroment for the program (can be NULL)│ ├────────────────────┼────────────────────────────────────────┤ │ULONG flags │flags (see DosExecPgm) │ ├────────────────────┼────────────────────────────────────────┤ │LONG * buffer │buffer for return-code of the program │ └────────────────────┴────────────────────────────────────────┘ Return-Value LONG return-code from the system ═══ 3.95.4. XProcess::ScanEnvironment ═══ Remarks Scan a value from the environment ( SET-entry of the config.sys ) Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * valueToSearch│the name of the value (eg. PATH) │ ├────────────────────┼────────────────────────────────────────┤ │XString * buffer │buffer to hold the data │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.95.5. XProcess::Sleep ═══ Remarks The current process is suspended for the given time Parameters LONG duration time to sleep in milliseconds ═══ 3.96. XProfile ═══ Overview Functions open/close  Close  Open read/write  Read  Write ═══ 3.96.1. XProfile overview ═══ Overview XProfile is a class to handle INI-files. ═══ 3.96.2. XProfile::Close ═══ Remarks close a profile ═══ 3.96.3. XProfile::Open ═══ Remarks Open a profile/create non existing profile Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * │application title │ ├────────────────────┼────────────────────────────────────────┤ │char * │filename of the profile (default is │ │ │OS2.INI ) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.96.4. XProfile::Read ═══ Remarks Read from a profile Read from a profile Parameters ┌────────────────────┬────────────────────────────────────────┐ │char *itemName │item name to read │ ├────────────────────┼────────────────────────────────────────┤ │XString *buffer │XString-buffer for the data to read │ │ │(must not be longer than 2048 bytes) │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │char *itemName │item name to read │ ├────────────────────┼────────────────────────────────────────┤ │void *buffer │buffer for the data to read │ ├────────────────────┼────────────────────────────────────────┤ │ULONG size │size of the buffer │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.96.5. XProfile::Write ═══ Remarks Write to a profile Parameters ┌────────────────────┬────────────────────────────────────────┐ │char *itemName │item name to write │ ├────────────────────┼────────────────────────────────────────┤ │void *buffer │buffer with the data to write │ ├────────────────────┼────────────────────────────────────────┤ │ULONG size │size of the buffer │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.97. XPushButton ═══ Overview Functions constructors/destructors  XPushButton ═══ 3.97.1. XPushButton overview ═══ Parent class: XButton Overview ═══ 3.97.2. XPushButton::XPushButton ═══ Remarks Constructs a pushbuttom Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner │ ├────────────────────┼────────────────────────────────────────┤ │XRect * rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ │ │BU_TEXT │ │ │BU_HELP │ │ │BU_DEFAULT │ │ │BU_NOPOINTERFOCUS │ │ │BU_NOBORDER │ │ │BU_NOCURSORSELECT │ │ │BU_AUTOSIZE │ │ │(can be or-ed). If BU_ICON or BU_BITMAP │ │ │is set, an icon/bitmap must be avaible │ │ │in the programs resources with the id │ │ │given in id (third parameter). │ ├────────────────────┼────────────────────────────────────────┤ │const char * string │text to display │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.98. XRadioButton ═══ Overview Functions constructors/destructors  XRadioButton ═══ 3.98.1. XRadioButton overview ═══ Parent class: XSettingButton Overview ═══ 3.98.2. XRadioButton::XRadioButton ═══ Remarks Constructs a XCheckBox Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │the style │ ├────────────────────┼────────────────────────────────────────┤ │const char * string │text to display │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.99. XRect ═══ Overview Functions  GetHeight  GetWidth  SetHeight  SetWidth  XRect ═══ 3.99.1. XRect overview ═══ Parent class: XPoint Overview ═══ 3.99.2. XRect::GetHeight ═══ Remarks Query the height Return-Value LONG heigth ═══ 3.99.3. XRect::GetWidth ═══ Remarks Query the width Return-Value LONG width ═══ 3.99.4. XRect::SetHeight ═══ Remarks Set the height Parameters LONG height ═══ 3.99.5. XRect::SetWidth ═══ Remarks Set the width Parameters LONG width ═══ 3.99.6. XRect::XRect ═══ Remarks Construct a rectangle Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG │xPosition │ ├────────────────────┼────────────────────────────────────────┤ │LONG │yPosition │ ├────────────────────┼────────────────────────────────────────┤ │LONG │width │ ├────────────────────┼────────────────────────────────────────┤ │LONG │height │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.100. XResource ═══ Overview Functions constructors/destructors  XResource ═══ 3.100.1. XResource overview ═══ Overview The class XResource describes resources used in an application. A resource may be an icon, a dialog template a menubar etc. An resource is decribed in the class XResource with an ID and a library (XResourceLibrary). The resources may reside in the EXE-file or in a resource-DLL (see XResouceLibrary for details). ═══ 3.100.2. XResource::XResource ═══ Remarks Constructs a resource. Resources are defined by an ID and a XResourceLibrary which contains the resource. Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │the ID of the resource │ ├────────────────────┼────────────────────────────────────────┤ │XResourceLibrary * │pointer to the library which contains │ │ │the resource. │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.101. XResourceLibrary ═══ Overview Functions constructors/destructors  XResourceLibrary  ~XResourceLibrary load resources  LoadString ═══ 3.101.1. XResourceLibrary overview ═══ Parent class: XObject Overview ═══ 3.101.2. XResourceLibrary::XResourceLibrary ═══ Remarks Constructs a resource library. Parameters char * path of the library without extension ".DLL". If the path is empty, a resource library will be created with the resources which are linked to the exe-file. If the file cannot be found an error ocures. Default is NULL. Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.101.3. XResourceLibrary::~XResourceLibrary ═══ Remarks Destructs a resource library. ═══ 3.101.4. XResourceLibrary::LoadString ═══ Remarks Loads a string out of the library. Parameters XString * string variable which will get the string ULONG theResourceID the ID of the string Exceptions If the method fails an exception of the type XException is thrown. ═══ 3.102. XResourceWindow ═══ Overview Functions constructor/destructor  XResourceWindow ═══ 3.102.1. XResourceWindow overview ═══ Parent class: XWindow Overview XResourceWindow is a window class which is loaded from the resources. Usualy you create a dialog-template with your dialog editor, disable the styles for titlebar and frame. Then create one or more XResourceWindows with a dialog or framewindow as owner. ═══ 3.102.2. XResourceWindow::XResourceWindow ═══ Remarks Create a resource-window Create a resource-window Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │owner │ ├────────────────────┼────────────────────────────────────────┤ │XResource * │resource where to load the window from │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │owner │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │ID of the window-resource (the resource │ │ │must be linked to the exe-file) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.103. XRexxInterface ═══ Overview Functions constructors/destructors  XRexxInterface misc  Execute  GetHandler register/deregister functions  DeregisterFunction  IsFunctionRegistered  RegisterFunction variables  GetVar  SetVar ═══ 3.103.1. XRexxInterface overview ═══ Parent class: XObject Overview ═══ 3.103.2. XRexxInterface::XRexxInterface ═══ Remarks Creates an interface to REXX. Therefore a C-function of you application (DLL) will be registered. The function must have following format::p.REXXINTERFACE Handler(PRXSTRING commandString, PUSHORT flags, PRXSTRING returnString) Commands which are not known in a rexx-script running in this interface will be posted to the handler. Creates an interface to REXX. Therefore a C-function of your application (EXE) will be registered. The function must have following format::p.REXXINTERFACE Handler(PRXSTRING commandString, PUSHORT flags, PRXSTRING returnString) Commands which are not known in a rexx-script running in this interface will be posted to the handler. Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * name │the symbolic name of the interface │ ├────────────────────┼────────────────────────────────────────┤ │char * dllName │the name of the DLL │ ├────────────────────┼────────────────────────────────────────┤ │char * proc │the name of your function │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │char * │the symbolic name of the interface │ ├────────────────────┼────────────────────────────────────────┤ │PFN │the adress of your function │ └────────────────────┴────────────────────────────────────────┘ Exceptions If the method fails an exception of the type XRexxException is thrown. If the method fails an exception of the type XRexxException is thrown. ═══ 3.103.3. XRexxInterface::Execute ═══ Remarks Run a REXX-script Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * commandFile │name of a file which contains the script│ ├────────────────────┼────────────────────────────────────────┤ │LONG type │type of command (see rexx program │ │ │reference) │ ├────────────────────┼────────────────────────────────────────┤ │XString * result │buffer for result │ ├────────────────────┼────────────────────────────────────────┤ │SHORT returnCode │buffer for returncode │ ├────────────────────┼────────────────────────────────────────┤ │XString * args │string which contains the arguments for │ │ │the script │ └────────────────────┴────────────────────────────────────────┘ Return-Value LONG result return-code from the operating system ═══ 3.103.4. XRexxInterface::GetHandler ═══ Remarks Returns a pointer to a XRexxInterface Parameters char * handlerName the name of the rexx interface used in the constructor char * dllName name of the DLL if used (default is NULL) Return-Value XRexxInterface * pointer pointer to an interface (NULL if no interface found) ═══ 3.103.5. XRexxInterface::DeregisterFunction ═══ Remarks Deregister a function Parameters char * name symbolic name of the function Return-Value LONG result return-code from the operating system ═══ 3.103.6. XRexxInterface::IsFunctionRegistered ═══ Remarks Query if a function is registered Parameters char * name symbolic name of the function Return-Value BOOL result ═══ 3.103.7. XRexxInterface::RegisterFunction ═══ Remarks Register a C-function of your application (DLL) so that it can be called from a rexx-script. The function must have the following format::p.REXXINTERFACE MyFunc( PUCHAR name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) Register a C-function of your application (EXE) so that it can be called from a rexx-script. The function must have the following format::p.REXXINTERFACE MyFunc( PUCHAR name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret) Parameters ┌────────────────────┬────────────────────────────────────────┐ │char * name │symbolic name of the function which must│ │ │be used in the rexx-script │ ├────────────────────┼────────────────────────────────────────┤ │char * dllName │name of the dll │ ├────────────────────┼────────────────────────────────────────┤ │char * proc │real name of the function │ └────────────────────┴────────────────────────────────────────┘ char * name symbolic name of the function which must be used in the rexx-script PFN proc adress of the function Return-Value LONG result return-code from the operating system LONG result return-code from the operating system ═══ 3.103.8. XRexxInterface::GetVar ═══ Remarks Query a variable for a running rexx-script Parameters char * name name of the variable XString * value buffer for the value of the variable Return-Value LONG result return-code from the operating system ═══ 3.103.9. XRexxInterface::SetVar ═══ Remarks Set a variable for a running rexx-script Parameters char * name name of the variable char * value value of the variable Return-Value LONG result return-code from the operating system ═══ 3.104. XRexxScript ═══ Overview Functions misc  Load  operator=Load ═══ 3.104.1. XRexxScript overview ═══ Parent class: XObject Overview ═══ 3.104.2. XRexxScript::Load ═══ Remarks Loads a rexx script from a file Parameters const char* filename Name of the file with the Rexx script ═══ 3.104.3. XRexxScript::operator=Load ═══ Remarks assigns a rexx script from a XString ═══ 3.105. XScrollBar ═══ Overview ═══ 3.105.1. XScrollBar overview ═══ Parent class: XControl Overview ═══ 3.106. XScrollWindow ═══ Overview Functions constructors/destructors  XScrollWindow scroll-functions  HScroll  SetVirtualX  SetVirtualY  VScroll scrollbars  AddHorzScroller  AddVertScroller  DeleteHorzScroller  DeleteVertScroller ═══ 3.106.1. XScrollWindow overview ═══ Parent class: XFrameWindow Overview ═══ 3.106.2. XScrollWindow::XScrollWindow ═══ Remarks Constructs a frame-window which does scrolling automaticaly. Note that destructors of windows are called automaticaly when a window is closed! (see ~XFrameWindow) Constructs a frame-window which does scrolling automaticaly. Note that destructors of windows are called automaticaly when a window is closed! (see ~XFrameWindow) Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │ID of the window. If resources are used │ │ │they must be linked to the exe-file. │ ├────────────────────┼────────────────────────────────────────┤ │char * │The title of the window which is │ │ │displayed in the titlebar │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │You can specify the style of the window │ │ │with the following defines, which can │ │ │be or-ed: │ │ │FRM_TITLEBAR the window gets a titlebar │ │ │FRM_SYSMENU the window gets the system │ │ │menu │ │ │FRM_MINBUTTON the titlebar get a button │ │ │to minimize the window │ │ │ FRM_MAXBUTTON the titlebar get a button│ │ │to maximize the window │ │ │ FRM_CENTER the window is created in the│ │ │midle of the workplace │ │ │ FRM_SIZEBORDER the windowsize can be │ │ │changed by the user │ │ │ FRM_DIALOGBORDER the window gets a │ │ │thick border │ │ │ FRM_BORDER the window gets a thin │ │ │border │ │ │ FRM_TASKLIST the window is displayed in│ │ │the tasklist │ │ │ FRM_NOMOVEWITHOWNER the window dontяt │ │ │move when the parent is moved │ │ │ FRM_ICON the window get an icon wich is│ │ │identified by theResourceID, if the icon│ │ │is not found in the resource-library, an│ │ │error ocurses │ │ │ FRM_ACCELTABLE an acceltable will be │ │ │loaded from the resources with the │ │ │windows id. │ │ │ FRM_SYSMODAL the window is displayed │ │ │system-modal │ │ │FRM_SCREENALIGN │ │ │FRM_MOUSEALIGN │ │ │FRM_HIDEBUTTON │ │ │FRM_HIDEMAX │ │ │FRM_AUTOICON │ │ │there are three static member-variables │ │ │for default styles │ │ │defaultStyle default setting for a │ │ │framewindow │ │ │defaultClientStyle default setting for │ │ │windows wich are displayed as a │ │ │clientwindow of a framewindow │ │ │defaultDialogStyle default setting for │ │ │windows wich are displayed as a dialog │ │ │ Default is defaultStyle. │ ├────────────────────┼────────────────────────────────────────┤ │XRect * │On default a window is created with │ │ │length and hight of zero. Windows which│ │ │are created with an resource template │ │ │get the size of the template. Default │ │ │is NULL. │ │ │ If theRectangle is specified, the │ │ │window gets the size of it. │ ├────────────────────┼────────────────────────────────────────┤ │XFrameWindow * │Parent-window, if parent is specified │ │ │the window is a client of the parent. │ │ │The behavior depends on the styles you │ │ │have set. │ │ │ Default is NULL. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │If this variable is set OOL try to build│ │buildFromResource │the window with a resource template │ │ │which is identified by theResourceID. If│ │ │the template is not found, an error │ │ │ocurses. │ │ │ Default is FALSE. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL animate │Enable/disable animation on window │ │ │creation. Default is FALSE │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XResource * │a XResource contains two informations, │ │theResourceID │an ID and a pointer to a │ │ │XResourceLibrary. If you want to create │ │ │a window out of a resourcefile you must│ │ │specify the ID (otherwise it can be │ │ │zero) and the XResourceLibrary which │ │ │contains the window-resource. The │ │ │window which is created always belongs │ │ │to the process who owns the resource │ │ │library, so if you work with multiple │ │ │processes every process must have its │ │ │own resource library. │ ├────────────────────┼────────────────────────────────────────┤ │char * theTitle │The title of the window which is │ │ │displayed in the titlebar │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │You can specify the style of the window │ │theStyleofWindow │with the following defines, which can │ │ │be or-ed: │ │ │FRM_TITLEBAR the window gets a titlebar │ │ │FRM_SYSMENU the window gets the system │ │ │menu │ │ │FRM_MINBUTTON the titlebar get a button │ │ │to minimize the window │ │ │ FRM_MAXBUTTON the titlebar get a button│ │ │to maximize the window │ │ │ FRM_CENTER the window is created in the│ │ │midle of the workplace │ │ │ FRM_SIZEBORDER the windowsize can be │ │ │changed by the user │ │ │ FRM_DIALOGBORDER the window gets a │ │ │thick border │ │ │ FRM_BORDER the window gets a thin │ │ │border │ │ │ FRM_TASKLIST the window is displayed in│ │ │the tasklist │ │ │ FRM_NOMOVEWITHOWNER the window dontяt │ │ │move when the parent is moved │ │ │ FRM_ICON the window get an icon wich is│ │ │identified by theResourceID, if the icon│ │ │is not found in the resource-library, an│ │ │error ocurses │ │ │ FRM_ACCELTABLE an acceltable will be │ │ │loaded from the resources with the │ │ │windows id. │ │ │ FRM_SYSMODAL the window is displayed │ │ │system-modal │ │ │FRM_SCREENALIGN │ │ │FRM_MOUSEALIGN │ │ │FRM_HIDEBUTTON │ │ │FRM_HIDEMAX │ │ │FRM_AUTOICON │ │ │there are three static member-variables │ │ │for default styles │ │ │defaultStyle default setting for a │ │ │framewindow │ │ │defaultClientStyle default setting for │ │ │windows wich are displayed as a │ │ │clientwindow of a framewindow │ │ │defaultDialogStyle default setting for │ │ │windows wich are displayed as a dialog │ │ │ Default is defaultStyle. │ ├────────────────────┼────────────────────────────────────────┤ │XRect * theRectangle│On default a window is created with │ │ │length and hight of zero. Windows which│ │ │are created with an resource template │ │ │get the size of the template. Default │ │ │is NULL. │ │ │ If theRectangle is specified, the │ │ │window gets the size of it. │ ├────────────────────┼────────────────────────────────────────┤ │XFrameWindow * │If parent is specified the window is a │ │parent │client of the parent. The behavior │ │ │depends on the styles you have set. │ │ │ Default is NULL. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │If this variable is set OOL try to build│ │buildFromResource │the window with a resource template │ │ │which is identified by theResourceID. If│ │ │the template is not found, an error │ │ │ocurses. │ │ │ Default is FALSE. │ ├────────────────────┼────────────────────────────────────────┤ │BOOL animate │Enable/disable animation on window │ │ │creation. Default is FALSE │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.106.3. XScrollWindow::HScroll ═══ Remarks This function is called when the window-contents must be scrolled horizontal. On default scrolling is done automaticaly Parameters LONG s how much pixels to scroll ═══ 3.106.4. XScrollWindow::SetVirtualX ═══ Remarks Set the virtual x-size of the window Parameters LONG x virtual x-size ═══ 3.106.5. XScrollWindow::SetVirtualY ═══ Remarks Set the virtual y-size of the window Parameters LONG y virtual y-size ═══ 3.106.6. XScrollWindow::VScroll ═══ Remarks This function is called when the window-contents must be scrolled vertcal. On default scrolling is done automaticaly Parameters LONG s how much pixels to scroll ═══ 3.106.7. XScrollWindow::AddHorzScroller ═══ Remarks Display a horizontal scroller ═══ 3.106.8. XScrollWindow::AddVertScroller ═══ Remarks Display a vertical scroller ═══ 3.106.9. XScrollWindow::DeleteHorzScroller ═══ Remarks Removes the horizontal scroller ═══ 3.106.10. XScrollWindow::DeleteVertScroller ═══ Remarks Removes the vertical scroller ═══ 3.107. XSemaphore ═══ Overview ═══ 3.107.1. XSemaphore overview ═══ Overview ═══ 3.108. XServerSocket ═══ Overview Functions Misc  Accept  Bind  Listen ═══ 3.108.1. XServerSocket overview ═══ Parent class: XSocket Overview ═══ 3.108.2. XServerSocket::Accept ═══ Remarks Accepts a connection request from a remote host and returns a socket where the server can read from and write to. Please remember to delete the returned socket after usage!! Return-Value XSocket* ═══ 3.108.3. XServerSocket::Bind ═══ Remarks Binds a local name to the socket. ═══ 3.108.4. XServerSocket::Listen ═══ Remarks Completes binding and creates a connection request queue for incoming connection requests. ═══ 3.109. XSettingButton ═══ Overview Functions misc  IsSelected  Select ═══ 3.109.1. XSettingButton overview ═══ Parent class: XButton Overview ═══ 3.109.2. XSettingButton::IsSelected ═══ Remarks Query if a button is selected Return-Value BOOL result ═══ 3.109.3. XSettingButton::Select ═══ Remarks Select/deselect a XSettingButton Parameters BOOL select TRUE=select, FALSE=deselect ═══ 3.110. XSize ═══ Overview Functions  GetHeight  GetWidth  SetHeight  SetWidth  XSize ═══ 3.110.1. XSize overview ═══ Parent class: XObject Overview ═══ 3.110.2. XSize::GetHeight ═══ Remarks Query the height Return-Value LONG heigth ═══ 3.110.3. XSize::GetWidth ═══ Remarks Query the width Return-Value LONG width ═══ 3.110.4. XSize::SetHeight ═══ Remarks Set the height Parameters LONG height ═══ 3.110.5. XSize::SetWidth ═══ Remarks Set the width Parameters LONG width ═══ 3.110.6. XSize::XSize ═══ Remarks Construct a size-description Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG │width │ ├────────────────────┼────────────────────────────────────────┤ │LONG │height │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.111. XSlider ═══ Overview Functions constructors/destructors  XSlider detents  AddDetent  GetDetentPos  RemoveDetent misc  SetScales set/get value  GetSliderPos  SetSliderPos size  SetShaftSize  SetSliderSize  SetTickSize text functions  GetScaleText  SetScaleText ═══ 3.111.1. XSlider overview ═══ Parent class: XControl Overview ═══ 3.111.2. XSlider::XSlider ═══ Remarks Constructs a XSlider Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the XSlider │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ │ │SL_HORIZONTAL │ │ │SL_VERTICAL │ │ │SL_CENTER │ │ │SL_BOTTOM │ │ │SL_TOP │ │ │SL_LEFT │ │ │SL_RIGHT │ │ │SL_SNAPTOINCREMENT │ │ │SL_BUTTONSBOTTOM │ │ │SL_BUTTONSTOP │ │ │SL_BUTTONSLEFT │ │ │SL_BUTTONSRIGHT │ │ │SL_READONLY │ │ │SL_RIBBONSTRIP │ │ │SL_HOMEBOTTOM │ │ │SL_HOMETOP │ │ │SL_HOMELEFT │ │ │SL_HOMERIGHT │ │ │SL_PRIMARYSCALE1 │ │ │SL_PRIMARYSCALE2 │ │ │ (can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use, e.g. "8.Helv" │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.111.3. XSlider::AddDetent ═══ Remarks Add a detend to the primary scale Parameters SHORT pos position of the detent Return-Value LONG the id of the detent ═══ 3.111.4. XSlider::GetDetentPos ═══ Remarks Get position of a detent Parameters LONG id of the detent Return-Value USHORT positionin pixels ═══ 3.111.5. XSlider::RemoveDetent ═══ Remarks Removes a detend from the primary scale Parameters LONG the id of the detent to remove ═══ 3.111.6. XSlider::SetScales ═══ Remarks Set scales 1 or 2 (depending if SL_PRIMARYSCALE1 or SL_PRIMARYSCALE2 is set) Parameters ┌────────────────────┬────────────────────────────────────────┐ │USHORT scale1Incr │increments for scale 1 │ ├────────────────────┼────────────────────────────────────────┤ │USHORT scale1Space │spaceing between increments for scale 1 │ ├────────────────────┼────────────────────────────────────────┤ │USHORT scale2Incr │increments for scale 2 (default is 0) │ ├────────────────────┼────────────────────────────────────────┤ │USHORT scale2Space │spaceing between increments for scale 2 │ │ │(default is 0) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.111.7. XSlider::GetSliderPos ═══ Remarks Returns the sliders position Return-Value LONG position ═══ 3.111.8. XSlider::SetSliderPos ═══ Remarks Set the sliders position Parameters LONG the new position ═══ 3.111.9. XSlider::SetShaftSize ═══ Remarks Set the size of the shaft Parameters SHORT size new size of the shaft ═══ 3.111.10. XSlider::SetSliderSize ═══ Remarks Set the size of the slider Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │length of the slider │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │breadth │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.111.11. XSlider::SetTickSize ═══ Remarks Set the size of a tick Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │the tick to change (zero-based index) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │length of the tick in pixels │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.111.12. XSlider::GetScaleText ═══ Remarks Get the text of a tick Parameters SHORT tickNumber the tick XString* buffer buffer to hold the text ═══ 3.111.13. XSlider::SetScaleText ═══ Remarks Add a text to a tick Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │the tick to get the text (zero-based │ │ │index) │ ├────────────────────┼────────────────────────────────────────┤ │char * │text to add │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.112. XSocket ═══ Overview Functions  SetValidInAddress Adress  SetInAddress Host  GetHostByAddr  GetHostByName  GetHostname Open/Close  Close  Open Port  SetInPort Read/Write  Read  Write constructors/destructors  XSocket  ~XSocket ═══ 3.112.1. XSocket overview ═══ Parent class: XIO Overview ═══ 3.112.2. XSocket::SetValidInAddress ═══ ═══ 3.112.3. XSocket::SetInAddress ═══ Remarks Sets the socket address. Parameters int ═══ 3.112.4. XSocket::GetHostByAddr ═══ Remarks sets information about a host specified by an Internet address; throws an exception in case of an error. The difference to GetHostByName is that the host must be specified as a 32-bit Internet address in network-byte order (eg. 192.32.4.10). ┌────────────────────┬────────────────────────────────────────┐ │const char* hostname│ │ ├────────────────────┼────────────────────────────────────────┤ │int addr │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.112.5. XSocket::GetHostByName ═══ Remarks sets information about a host specified by an Internet address; throws an exception in case of an error Parameters const char* ═══ 3.112.6. XSocket::GetHostname ═══ Remarks Get the standard hostname for the local host machine; throws an exception in case of an error. Return-Value XString ═══ 3.112.7. XSocket::Close ═══ Remarks closes the socket and throws XException in case of an error. ═══ 3.112.8. XSocket::Open ═══ Remarks opens a socket and throws an exception in case of an error. Parameters ┌────────────────────┬────────────────────────────────────────┐ │int net │ │ ├────────────────────┼────────────────────────────────────────┤ │int typ │ │ ├────────────────────┼────────────────────────────────────────┤ │int y │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.112.9. XSocket::SetInPort ═══ Remarks Sets the socket port. Parameters int ═══ 3.112.10. XSocket::Read ═══ Remarks Receives data; throws an exception in case of an error. Returns the number of bytes of the received data. ═══ 3.112.11. XSocket::Write ═══ Remarks Sends a buffer; throws an exception in case of an error ═══ 3.112.12. XSocket::XSocket ═══ Remarks Constructor for the socket class; initializes the socket system ═══ 3.112.13. XSocket::~XSocket ═══ ═══ 3.113. XSound ═══ Overview Functions constructors/destructors  XSound  ~XSound ═══ 3.113.1. XSound overview ═══ Parent class: XMediaWindow Overview ═══ 3.113.2. XSound::XSound ═══ Remarks Construct a sound-device. XSound can play MIDI and WAV-files. To use this control you must invoke the multimedia-library! Parameters XFrameWindow * owner the owner of the device ═══ 3.113.3. XSound::~XSound ═══ Remarks The destructor MUST be called before the message-loop of an aplication is destroyed. Therefore overwrite QueryForClose() of the owning framewindow and call the destructor of XSound in that function. ═══ 3.114. XSpinButton ═══ Overview Functions constructors/destructors  XSpinButton limits  SetLimits misc  SetMaster  SetTextLimit  SpinDown  SpinUp set/query values  GetValue  SetValue ═══ 3.114.1. XSpinButton overview ═══ Parent class: XControl Overview ═══ 3.114.2. XSpinButton::XSpinButton ═══ Remarks Constructs a XSpinButton Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the XSlider │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ │ │SP_LEFT │ │ │SP_RIGHT │ │ │SP_CENTER │ │ │SP_NOBORDER │ │ │SP_FAST │ │ │SP_MASTER │ │ │SP_SERVANT │ │ │SP_READONLY │ │ │SP_NUMERIC │ │ │SP_CHAR │ │ │SP_FILLZERO │ │ │ (can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use, e.g. "8.Helv" │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.114.3. XSpinButton::SetLimits ═══ Remarks Set limits of the spinbutton Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG │the lower limit │ ├────────────────────┼────────────────────────────────────────┤ │LONG │the upper limit │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.114.4. XSpinButton::SetMaster ═══ Parameters XWindow* master Return-Value BOOL result ═══ 3.114.5. XSpinButton::SetTextLimit ═══ Remarks Set maximum textlength Parameters SHORT maximum length ═══ 3.114.6. XSpinButton::SpinDown ═══ Remarks Spin down window-content Parameters LONG units to spin down ═══ 3.114.7. XSpinButton::SpinUp ═══ Remarks Spin up window-content Parameters LONG units to spin up ═══ 3.114.8. XSpinButton::GetValue ═══ Remarks Returns the current value of the spinbutton ═══ 3.114.9. XSpinButton::SetValue ═══ Remarks Set the value of the spinbutton Parameters LONG the new value ═══ 3.115. XStatic ═══ Overview ═══ 3.115.1. XStatic overview ═══ Parent class: XWindow Overview ═══ 3.116. XStaticBitmap ═══ Overview Functions constructors/destructors  XStaticBitmap ═══ 3.116.1. XStaticBitmap overview ═══ Parent class: XStatic Overview ═══ 3.116.2. XStaticBitmap::XStaticBitmap ═══ Remarks Constructs a static bitmap Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the bitmap │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │LONG id │the id of the bitmap in the program │ │ │resources │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │the style │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.117. XStaticFrame ═══ Overview Functions constructors/destructors  XStaticFrame ═══ 3.117.1. XStaticFrame overview ═══ Parent class: XStatic Overview ═══ 3.117.2. XStaticFrame::XStaticFrame ═══ Remarks Constructs a static frame Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the frame │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │LONG id │id for the frame │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.118. XStaticIcon ═══ Overview Functions constructors/destructors  XStaticIcon ═══ 3.118.1. XStaticIcon overview ═══ Parent class: XStatic Overview ═══ 3.118.2. XStaticIcon::XStaticIcon ═══ Remarks Constructs a static icon Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the icon │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │LONG id │the id of the icon in the program │ │ │resources │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │the style │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.119. XStaticText ═══ Overview Functions constructors/destructors  XStaticText ═══ 3.119.1. XStaticText overview ═══ Parent class: XStatic Overview ═══ 3.119.2. XStaticText::XStaticText ═══ Remarks Constructs a static text Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the icon │ ├────────────────────┼────────────────────────────────────────┤ │char * text │text to display │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │LONG style │the style │ ├────────────────────┼────────────────────────────────────────┤ │LONG id │the id of the icon in the program │ │ │resources │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use, eg "8.Helv" (default is │ │ │NULL) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.120. XString ═══ Overview Functions  SearchWhitespace Caster  GetBuffer  MakeDouble  MakeInt  MakeLong  ReleaseBuffer Comperasion  IsEmpty  StrCmp Constructor/Destructor  XString  ~XString Enhanced  Find  FindRev  Replace  Search  Strip  StripWhitespaces Get   At  GetLength  Left  Mid  Right  operator  operator[] Other conversions  MakeUpper Set  DelSubString  Insert  operator+=  operator= ═══ 3.120.1. XString overview ═══ ═══ 3.120.2. XString::SearchWhitespace ═══ Remarks Stripes whitespaces from string, see Strip() ═══ 3.120.3. XString::GetBuffer ═══ Remarks Sometimes an int is available for the length.. This is the most dangerous function, because it allows you access to the heart of XString, the char-buffer! Don't use this function for dircet manipulations of the buffer! This function has another job to do! The job of this method is to work as a caster, when some awefull and dirty C-functions needs a char-pointer, like sprintf. Size is the size you initialize the string, take care that the size is great enough! Don't forget to call the ReleaseBuffer()-Function after GetBuffer()! ReleaseBuffer correct the length of the string. The Size is exactly the size of chars in the buffer, the byte for the zero-byte is automatically added! See the example! Example XString a; double pi=3.14; sprintf(a.GetBuffer(100), "Pi = %2.3f", pi); a.ReleaseBuffer(); . ═══ 3.120.4. XString::MakeDouble ═══ Remarks Wandelt einen XString in einen double um History ┌────────────────────┬────────────────────────────────────────┐ │ Jul 09 1997 │ created by Jens von Pilgrim │ ├────────────────────┼────────────────────────────────────────┤ │ │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.120.5. XString::MakeInt ═══ Remarks Wandelt einen XString in einen interger um History ┌────────────────────┬────────────────────────────────────────┐ │ Jul 09 1997 │ created by Jens von Pilgrim │ ├────────────────────┼────────────────────────────────────────┤ │ │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.120.6. XString::MakeLong ═══ Remarks Wandelt einen XString in einen long integer um History ┌────────────────────┬────────────────────────────────────────┐ │ Jul 09 1997 │ created by Jens von Pilgrim │ ├────────────────────┼────────────────────────────────────────┤ │ │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.120.7. XString::ReleaseBuffer ═══ Remarks After getting the buffer with GetBuffer, and after setting the size of the string to Size, this function correct the size of the buffer, so that the size of the buffer is equal to the length of the string. Don't use any other function after GetBuffer, before not calling ReleaseBuffer!!!!!!!!!! ═══ 3.120.8. XString::IsEmpty ═══ Remarks If the string is not allocated (f.e. a Stringpointer before calling new) is NOT empyt! If you call any String-Function before calling the Constructor, most functions fail and the program will exit by a failed X_ASSERT! Return-Value true, if the String is empty BOOL, else ═══ 3.120.9. XString::StrCmp ═══ Remarks Returns exactly the result from strcmp, usefull if other function needs this result. The Result is == 0: this string == inThen < 0: this string < inThen > 0: this string > inThen ═══ 3.120.10. XString::XString ═══ Remarks Constructs a string and casts an int, usefull as caster Constructs a string and casts an int, usefull as caster Constructs a string with first char == aChar Constructs a string as a copy of pszChar, usefull as caster Constructs a string as a copy of 'aString' Constructs an empty string ═══ 3.120.11. XString::~XString ═══ Remarks (Virtual) Destructor, removes string from memory ═══ 3.120.12. XString::Find ═══ Remarks Because some parameters have standard values, you can call this method also with Find(pos, "..."). Return-Value true, if substring is in string, outPos is the (zero-indexed) position of the substring in string (the first). BOOL, if the substring was not found ═══ 3.120.13. XString::FindRev ═══ Remarks Because some parameters have standard values, you can call this method also with Find(pos, "..."). Return-Value true, if substring is in string, outPos is the (zero-indexed) position of the substring in string (the first). BOOL, if the substring was not found History ┌────────────────────┬────────────────────────────────────────┐ │ 1998/20/01 │ First character and complete string is │ │ │find now, too! │ ├────────────────────┼────────────────────────────────────────┤ │ │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.120.14. XString::Replace ═══ Remarks This is one of the most powerful methods of XString. It works as the Search-Replace-Function of you editor. Of course, the search- and the replace-substring must NOT have the same length! The methods is working very fast, because it first searches the substring, allocs new memory by calculing the new size, and then a new string is build. When the new string is build, there is no more search necessary (only if the replacement-string is greater then the searchstring and the length of the searchstring is smaller then the size of a XSIZE_T-type!). In this moment I'm working on another Replace-method: Replace(BadEnglish, CorrectEnglish, everywhere in this docu...) ;-) Parameters inSearch is the substring to search, inReplace is the string wich replaces the searchstring, the substring is max. inTimes replaced and inFrom and inTo mark the scope. Return-Value Number of replacements ═══ 3.120.15. XString::Search ═══ Remarks Like Find() without position-variable ═══ 3.120.16. XString::Strip ═══ Remarks Strip removes all inChars at the beginning (inWhere=XLEFT), at the end (inWhere=XRIGHT), at both ends (inWhere=XBOTH) or removes all inChars (inWhere=XALL) from the string! If you have to remove substring, use Replace() instead! Return-Value Number of removed chars ═══ 3.120.17. XString::StripWhitespaces ═══ Remarks Strip whitespaces ( Space, Tab, Linefeed, Carriage return ) like function "Strip" Return-Value Number of removed chars ═══ 3.120.18. XString:: ═══ Remarks Returns pointer of charpointer of the string Return-Value lpsz-Pointer ═══ 3.120.19. XString::At ═══ Remarks Returns copy(!) of char at position index. If index is greater than the length, 0 is returned. The first char has index 0! Return-Value Returns the char at position inZeroIndex od 0. ═══ 3.120.20. XString::GetLength ═══ Remarks Returns the length of the string! ═══ 3.120.21. XString::Left ═══ Remarks If Count>GetLength(), a copy of the string is returned, if Count is 0, an empty string is returned. Return-Value Returns the first Count chars as a XString from string. Thus, it's equal to Mid(0, nCount). ═══ 3.120.22. XString::Mid ═══ Remarks If From>GetLength(), an empty string is returned; if From+Count>GetLength(), a string with a length of (GetLength()-From) is returned. Return-Value Returns substring with Count-length from position From in string. ═══ 3.120.23. XString::Right ═══ Remarks What do you think this methods is for? See Left() for details, rigth up! ═══ 3.120.24. XString::operator ═══ ═══ 3.120.25. XString::operator[] ═══ Remarks Returns char-reference at position index The first char has index 0! Return-Value Returns the char at position inZeroIndex. Returns the char at position inZeroIndex. ═══ 3.120.26. XString::MakeUpper ═══ Remarks A-Z -> a-z (with _strupr), plus: ─, ╓, ▄ -> ф, Ў, № a-z -> A-Z (with _strupr), plus: ф,Ў,№,▀ -> ─, ╓, ▄, SS ═══ 3.120.27. XString::DelSubString ═══ Remarks Deletes inCount-chars from inFrom (Zero-Index!). Deletes the first place occurrence of inSubString ═══ 3.120.28. XString::Insert ═══ Remarks Inserts a substring into the sting at postion pos. Example XString A("ABCGHI"); A.Insert("DEF", 3); cout << A(); // result: ABCDEFGHI . ═══ 3.120.29. XString::operator+= ═══ Remarks Adds a string Concats string with another string Str and saves the result in string. Return-Value Returns thisString+Str Example XString a,b,c; a=(b+=c); Result: (a==b) = true . ═══ 3.120.30. XString::operator= ═══ Remarks The Sourcestring aString is copied (duplicated) to this-string Return-Value Returns copy of aString ═══ 3.121. XStyleHandler ═══ Overview Functions  XStyleHandler ═══ 3.121.1. XStyleHandler overview ═══ Parent class: XHandler Overview XStyleHandler catch events when the style of a window has changed (e.g. if the user droped a font or color on a window). If you want to catch these events derive a class of XStyleHandler and override HandleEvent(). In HandleEvent you get a XEvent where you can get the ID of the event. Valid values are: ┌────────────────────┬────────────────────────────────────────┐ │STY_FONT │font changed │ ├────────────────────┼────────────────────────────────────────┤ │STY_FOREGROUNDCOLOR │foreground-color changed │ ├────────────────────┼────────────────────────────────────────┤ │STY_BACKGROUNDCOLOR │background-color changed │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.121.2. XStyleHandler::XStyleHandler ═══ Parameters XWindow * window The window to handle the events for. ═══ 3.122. XSystemDialog ═══ Overview Functions misc  GetCommand ═══ 3.122.1. XSystemDialog overview ═══ ═══ 3.122.2. XSystemDialog::GetCommand ═══ Remarks Return the users action. Return-Value SHORT action ID of the users action: USER_OK USER_CANCEL ═══ 3.123. XText ═══ Overview Functions constructors/destructors  XText misc  SetText style  GetStyle  SetStyle ═══ 3.123.1. XText overview ═══ Parent class: XGraphicObject Overview ═══ 3.123.2. XText::XText ═══ Remarks Construct a text object. Construct a text object, this constructor should only be used with XGraphicDevice, not with XPrinterDevice Parameters ┌────────────────────┬────────────────────────────────────────┐ │XGraphicDevice * │owner │ │device │ │ ├────────────────────┼────────────────────────────────────────┤ │XFont * font │font to use │ ├────────────────────┼────────────────────────────────────────┤ │XPoint * point │base point │ ├────────────────────┼────────────────────────────────────────┤ │char * text │the text to print │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XFont * font │font to use │ ├────────────────────┼────────────────────────────────────────┤ │XRect * rect │rectangle │ ├────────────────────┼────────────────────────────────────────┤ │char * text │the text to print │ ├────────────────────┼────────────────────────────────────────┤ │SHORT style │style, possible values are: │ │ │TX_TOP │ │ │TX_VCENTER │ │ │TX_BOTTOM │ │ │TX_LEFT │ │ │TX_CENTER │ │ │TX_RIGHT │ │ │TX_WORDBREAK │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.123.3. XText::SetText ═══ Remarks Set text to draw Parameters char * theText ═══ 3.123.4. XText::GetStyle ═══ Remarks Query the current style Return-Value LONG theStyle ═══ 3.123.5. XText::SetStyle ═══ Remarks Set the style to use (not with XPrinterDevice) Parameters LONG style, possible values are:  TX_TOP  TX_VCENTER  TX_BOTTOM  TX_LEFT  TX_CENTER  TX_RIGHT  TX_WORDBREAK ═══ 3.124. XThread ═══ Overview Functions constructors/destructors  XThread initiate/terminate a process  Terminate ═══ 3.124.1. XThread overview ═══ Parent class: XProcess Overview ═══ 3.124.2. XThread::XThread ═══ Remarks Contructs a thread. After a thread is constructed, call Run() to make the thread work. You must override method XThread::Init() where you have full controll of the thread. To stop the thread call Terminate(). If your thread should have access to windows, use XPMThread instead. ═══ 3.124.3. XThread::Terminate ═══ Remarks With this method a thread can be terminated. If you call Terminate() the method QueryForQuit() will not be called. ═══ 3.125. XTime ═══ Overview Functions constructors/desructors  XTime misc  Compare  Format  GetCurrentTime  IsLegalTime operators  operator!=  operator=  operator== ═══ 3.125.1. XTime overview ═══ Parent class: XObject Overview ═══ 3.125.2. XTime::XTime ═══ Remarks Construct a XTime, if no parameters are used all values are zero, call GetCurrentTime() to get the current time. ═══ 3.125.3. XTime::Compare ═══ Remarks Compares the time stored with another time Return-Value ┌────────────────────┬────────────────────────────────────────┐ │SHORT result │-1 the time stored is earlier, 0 the │ │ │times are equal,1 the time stored is │ │ │later │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.125.4. XTime::Format ═══ Remarks Print the date formated in a string Parameters ┌────────────────────┬────────────────────────────────────────┐ │XString * │buffer which will hold data │ ├────────────────────┼────────────────────────────────────────┤ │char * │string which holds the format to use, │ │ │see strftime() for valid format │ │ │attributes │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.125.5. XTime::GetCurrentTime ═══ Remarks Query the current time. ═══ 3.125.6. XTime::IsLegalTime ═══ Remarks Query if the time is correct Return-Value BOOL ═══ 3.125.7. XTime::operator!= ═══ Remarks Compare two XTimes ═══ 3.125.8. XTime::operator= ═══ Remarks Copy the current time to another XTime instance ═══ 3.125.9. XTime::operator== ═══ Remarks Compare two XTimes ═══ 3.126. XTimeEntryField ═══ Overview Functions constructors/destructors  XTimeEntryField ═══ 3.126.1. XTimeEntryField overview ═══ Parent class: XEntryField Overview ═══ 3.126.2. XTimeEntryField::XTimeEntryField ═══ Remarks Constructs an entryfield for Times. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner of the entryfield │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window (default is zero) │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ ├────────────────────┼────────────────────────────────────────┤ │EN_LEFT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_CENTER │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_RIGHT │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSCROLL │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_MARGIN │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOTAB │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_READONLY │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_UNREADABLE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_AUTOSIZE │ │ ├────────────────────┼────────────────────────────────────────┤ │EN_BORDER │ │ └────────────────────┴────────────────────────────────────────┘ (can be or-ed) const char * string text to display const char * font font to use BOOL checkTimes TRUE=check entered Time when the focus is lost. If the entered Time is not a legal Time, the background turns red. FALSE=dont check entered values. ═══ 3.127. XTimer ═══ Overview Functions constructors/destructors  XTimer misc  QueryTimeOut  Start  Stop  TimeEvent ═══ 3.127.1. XTimer overview ═══ Parent class: XHandler Overview XTimer is a timer which is activated in time-intervals given in XTimer::Start(). Time-intervals shouldnt be smaller than 1/18 second. To handle time-events derive a class from XTimer and override TimeEvent(). ═══ 3.127.2. XTimer::XTimer ═══ Remarks Constructs a timer. Parameters XWindow * owner the owner window ═══ 3.127.3. XTimer::QueryTimeOut ═══ Remarks Query the time-interval Return-Value ULONG time-interval in milliseconds ═══ 3.127.4. XTimer::Start ═══ Remarks Start the timer. Parameters ULONG time time-interval in milli-seconds. ═══ 3.127.5. XTimer::Stop ═══ Remarks Stop the timer. ═══ 3.127.6. XTimer::TimeEvent ═══ Remarks The timer got a timeout. Override this function to handle timer-events. ═══ 3.128. XToolBar ═══ Overview Functions  DoControl adding/removing windows  AddWindow  RemoveWindow constructors/destructors  XToolBar  ~XToolBar display  Draw  GetBackgroundColor  Show sizing  ReSize  SetBorderSize  SetHeight ═══ 3.128.1. XToolBar overview ═══ Parent class: XWindow Overview XToolBar represents a toolbar for framewindows. You can attach every type of control to it. ═══ 3.128.2. XToolBar::DoControl ═══ Remarks If a control event is send from a client of the toolbar the event will be send to the owner frame window. ═══ 3.128.3. XToolBar::AddWindow ═══ Remarks Attach a window to the toolbar. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * theWindow │window to add │ ├────────────────────┼────────────────────────────────────────┤ │BOOL newGroup │with this window a new group starts │ ├────────────────────┼────────────────────────────────────────┤ │BOOL adjustSize │recalculate the hight of the toolbar │ │ │depending on the dimensions of theWindow│ ├────────────────────┼────────────────────────────────────────┤ │XWindow * │insert theWindow behind this window │ │insertBehind │ │ ├────────────────────┼────────────────────────────────────────┤ │LONG xOffset │x-offset of the window │ ├────────────────────┼────────────────────────────────────────┤ │LONG yOffset │y-offset of the window (usefull for │ │ │XComboBox) │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.128.4. XToolBar::RemoveWindow ═══ Remarks Removes a window attached to the toolbar Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │window to remove │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │recalculate the position of other │ │ │attached windows │ └────────────────────┴────────────────────────────────────────┘ Return-Value BOOL success ═══ 3.128.5. XToolBar::XToolBar ═══ Remarks Creates a toolbar Parameters ┌────────────────────┬────────────────────────────────────────┐ │XFrameWindow * │framewindow wich gets the toolbar │ │parent │ │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │the style of the toolbar, possible │ │ │values are: │ │ │TB_TOP toolbar is on the top of the │ │ │framwindow │ │ │TB_BOTTOM toolbar is on the bottom of │ │ │the framwindow │ │ │TB_LEFT toolbar is on the left side of │ │ │the framwindow │ │ │TB_RIGHT toolbar is on the right side of│ │ │the framwindow │ │ │TB_RIPABLE the user can rip the toolbar │ │ │ default is TB_TOP │ ├────────────────────┼────────────────────────────────────────┤ │ULONG id │window-ID, default is 0 │ ├────────────────────┼────────────────────────────────────────┤ │USHORT ySize │hight of the toolbar in pixels, default │ │ │is 20 │ ├────────────────────┼────────────────────────────────────────┤ │USHORT groupSpace │size between window-groups in pixels, │ │ │default is 15 │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.128.6. XToolBar::~XToolBar ═══ Remarks Destructor, every attached window is destroyed and the destructors of the windows are called. ═══ 3.128.7. XToolBar::Draw ═══ Remarks Redraw the toolbar. ═══ 3.128.8. XToolBar::GetBackgroundColor ═══ Remarks Returns the background color Parameters XColor * colorBuffer buffer which will get the color ═══ 3.128.9. XToolBar::Show ═══ Remarks Show/hide the toolbar Parameters BOOL show TRUE=show, FALSE=hide ═══ 3.128.10. XToolBar::ReSize ═══ Remarks The positions of the attached windows are recalculated. ═══ 3.128.11. XToolBar::SetBorderSize ═══ Remarks Set the size between the border of the toolbar and the attached windows Parameters USHORT borderSize size of border in pixels ═══ 3.128.12. XToolBar::SetHeight ═══ Remarks Set the hight of the toolbar Parameters USHORT ySize the new hight in pixels ═══ 3.129. XTrafficLight ═══ Overview Functions  SetState ═══ 3.129.1. XTrafficLight overview ═══ Parent class: XUserWindow Overview XTrafficLight is a class which creates a window that looks like a traffic light For applications which use XTrafficLight it is nessecary that the OOL-resourcelibrary OOLRES.DLL is in the libpath. ═══ 3.129.2. XTrafficLight::SetState ═══ Remarks Set the current state Parameters SHORT state, possible values are: 1. TRAFFIC_OFF 2. TRAFFIC_GREEN 3. TRAFFIC_YELLOW 4. TRAFFIC_RED 5. TRAFFIC_YELLOWRED ═══ 3.130. XUserButton ═══ Overview Functions constructors/destructors  XUserButton misc  IsSelected  Select  Toggle style  GetBitmapPointer  GetGraphPointer  GetTextPointer  SetBitmap ═══ 3.130.1. XUserButton overview ═══ Parent class: XSettingButton Overview ═══ 3.130.2. XUserButton::XUserButton ═══ Remarks Constructs a userbuttom Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │the owner │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │the rectangle │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │id of the window │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, valid values are: │ │ │BU_HELP │ │ │BU_DEFAULT │ │ │BU_NOPOINTERFOCUS │ │ │BU_NOCURSORSELECT │ │ │BU_NOBORDER │ │ │BU_TWOSTATE │ │ │(can be or-ed). │ ├────────────────────┼────────────────────────────────────────┤ │const char * string │text to display (default is NULL) │ ├────────────────────┼────────────────────────────────────────┤ │SHORT yOffset │an y-offset for the bitmap (useful if │ │ │you use bimaps and text, default is │ │ │NULL) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.130.3. XUserButton::IsSelected ═══ Remarks Query if the button is selected or not Return-Value BOOL selection ═══ 3.130.4. XUserButton::Select ═══ Remarks Select te button Parameters BOOL selection TRUE=select, FALSE=unselect ═══ 3.130.5. XUserButton::Toggle ═══ Remarks Toggles the button ═══ 3.130.6. XUserButton::GetBitmapPointer ═══ Remarks Returns a pointer to one of two used bitmaps. Parameters ┌────────────────────┬────────────────────────────────────────┐ │UCHAR index │index of the bitmap: │ │ │ 0 = the bitmap to display if the button│ │ │is not pressed │ │ │ 1 = the bitmap to display if the button│ │ │is pressed │ └────────────────────┴────────────────────────────────────────┘ Return-Value XBitmap * bmp the requested bitmap ═══ 3.130.7. XUserButton::GetGraphPointer ═══ Remarks Returns a pointer to the graphic-device of the button. Return-Value XGraphicDevice * dev the graphic device ═══ 3.130.8. XUserButton::GetTextPointer ═══ Remarks Returns a pointer to used text-object of the button. Return-Value XText * text the text object ═══ 3.130.9. XUserButton::SetBitmap ═══ Remarks Set a bitmap to the button. The bitmap is copied so the destructor of the bitmap given in the argument can be called when this functions returns. Parameters ┌────────────────────┬────────────────────────────────────────┐ │XBitmap * bmp │the bitmap │ ├────────────────────┼────────────────────────────────────────┤ │UCHAR index │index of the bitmap: │ │ │ 0 = the bitmap to display if the button│ │ │is not pressed │ │ │ 1 = the bitmap to display if the button│ │ │is pressed /t> │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.131. XUserWindow ═══ Overview ═══ 3.131.1. XUserWindow overview ═══ Parent class: XWindow Overview ═══ 3.132. XValueSet ═══ Overview Functions constructors/destructors  XValueSet item attributes  SetItemAttribute item contents  GetItem  SetItem misc  SetDimensions selection  GetSelection  SelectItem size  GetItemSize  GetItemSpacing  SetItemSize  SetItemSpacing ═══ 3.132.1. XValueSet overview ═══ Parent class: XControl Overview ═══ 3.132.2. XValueSet::XValueSet ═══ Remarks Construct a value-set Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * owner │owner of the value-set │ ├────────────────────┼────────────────────────────────────────┤ │XRect&rect │position and size │ ├────────────────────┼────────────────────────────────────────┤ │USHORT id │control-id │ ├────────────────────┼────────────────────────────────────────┤ │ULONG style │style, possible values are: │ │ │VA_ICON │ │ │VA_BITMAP │ │ │VA_COLOR │ │ │VA_TEXT │ │ │VA_BORDER │ │ │VA_ITEMBORDER │ │ │(can be or-ed) │ ├────────────────────┼────────────────────────────────────────┤ │char * font │font to use, e.g. "8.Helv" │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.3. XValueSet::SetItemAttribute ═══ Remarks Set the items attributes Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT attr │the attribute: │ │ │VA_ICON │ │ │VA_BITMAP │ │ │VA_COLOR │ │ │VA_TEXT │ │ │VA_ITEMBORDER │ ├────────────────────┼────────────────────────────────────────┤ │BOOL enable │ │ │enabe/disable │ │ │attribute │ │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.4. XValueSet::GetItem ═══ Remarks Get the items attributes Get the items icon/bitmap-handle Get the items color Get the items text (if it is in text-mode) Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │colum of the item │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │LONG&value │icon/bitmap-handle from the item │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │XColor * col │buffer to hold the color │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │XString * │buffer buffer to hold the text │ └────────────────────┴────────────────────────────────────────┘ Return-Value SHORT theAttribute ═══ 3.132.5. XValueSet::SetItem ═══ Remarks Set the items content Set the items content Set the items text (if it is in text-mode) Set the items color (if VA_COLOR is set) Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │XBitmap * │bitmap │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │XIcon * │icon │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │char * text │the new text │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │SHORT row │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT col │colum of the item │ ├────────────────────┼────────────────────────────────────────┤ │XColor * col │the new color │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.6. XValueSet::SetDimensions ═══ Remarks Set the number of colums and rows. Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │rows │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │cols │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.7. XValueSet::GetSelection ═══ Remarks Returns column/row of the selected item. Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT& │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT& │colum of the item │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.8. XValueSet::SelectItem ═══ Remarks Select an item Parameters ┌────────────────────┬────────────────────────────────────────┐ │SHORT │row of the item │ ├────────────────────┼────────────────────────────────────────┤ │SHORT │colum of the item │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.132.9. XValueSet::GetItemSize ═══ Remarks Returns the size of the items Parameters XSize * bufer to hold the size ═══ 3.132.10. XValueSet::GetItemSpacing ═══ Remarks Returns the spacing between the items Parameters XSize * buffer to hold horizontal(vertical spacing ═══ 3.132.11. XValueSet::SetItemSize ═══ Remarks Set the size of the items. Parameters XSize * size ═══ 3.132.12. XValueSet::SetItemSpacing ═══ Remarks Set the spacing between the items. Parameters XSize * size ═══ 3.133. XVideo ═══ Overview Functions constructors/destructors  XVideo construtors/destructors  ~XVideo misc  SetViewPort ═══ 3.133.1. XVideo overview ═══ Parent class: XMediaWindow Overview ═══ 3.133.2. XVideo::XVideo ═══ Remarks Construct a video-window. To use this control you must invoke the multimedia-library! Parameters XFrameWindow * owner the owner of the video ═══ 3.133.3. XVideo::~XVideo ═══ Remarks The destructor MUST be called before the message-loop of an aplication is destroyed. Therefore overwrite QueryForClose() of the owning framewindow and call the destructor of XVideo in that function. ═══ 3.133.4. XVideo::SetViewPort ═══ Remarks Set a framewindow as the viewport where videos are displayed Parameters XFrameWindow * window the window to show the video Return-Value LONG resultcode ═══ 3.134. XWindow ═══ Overview Functions colors  GetBackgroundColor  GetForegroundColor  SetBackgroundColor  SetForegroundColor constructors/destructors  ~XWindow focus  FocusChanged  SetFocus fonts  GetFontName  SetFont misc  Activate  Close  Enable  EnableWindowUpdate  GetSysValue  GetWindow  GetWindowID  Invalidate  IsVisible  QueryWindow  SetOwner  SetParent pointer  GetPointerHandle  GetPointerPos  GetSystemPointerHandle  SetPointer size  GetUpdateRect  SetSize size/position/order  DoMove  DoSize  GetSize  SetBottom  SetTop  Show style  GetStyle  SetStyle text functions  GetText  GetTextLength  SetText user input  DoCommand  DoControl  DoSysCommand ═══ 3.134.1. XWindow overview ═══ Parent class: XObject Overview XWindow is the base class for several window classes. ═══ 3.134.2. XWindow::GetBackgroundColor ═══ Remarks Query the background-color of the window Parameters XColor * color buffer to hold data ═══ 3.134.3. XWindow::GetForegroundColor ═══ Remarks Query the foreground-color of the window Parameters XColor * color buffer to hold data ═══ 3.134.4. XWindow::SetBackgroundColor ═══ Remarks Set the foregrund-color of the window Parameters XColor * color the new color Return-Value BOOL success ═══ 3.134.5. XWindow::SetForegroundColor ═══ Remarks Set the foregrund-color of the window Parameters XColor * color the new color Return-Value BOOL success ═══ 3.134.6. XWindow::~XWindow ═══ Remarks Destructors of windows are called automaticaly when they are closed. All destructors of child-windows are called too. All handlers registered at the window aredestructed. You can destroy a window by calling the destructor. ═══ 3.134.7. XWindow::FocusChanged ═══ Remarks Informs the window if the focus a moved Override this function if you need this information. Parameters BOOL focus is received ═══ 3.134.8. XWindow::SetFocus ═══ Remarks Set the focus to this window Return-Value BOOL result ═══ 3.134.9. XWindow::GetFontName ═══ Remarks Query the font of the window Parameters XString * buffer the name of the font in format "10.Helvetica" ═══ 3.134.10. XWindow::SetFont ═══ Remarks Set the font of the window Set the font of the window Parameters char * fontName the name of the font in format "10.Helvetica" char * fontName the name of the font USHORT fontSize the size of the font Return-Value BOOL success BOOL success ═══ 3.134.11. XWindow::Activate ═══ Remarks Activate the window ═══ 3.134.12. XWindow::Close ═══ Remarks Close the window ═══ 3.134.13. XWindow::Enable ═══ Remarks Enable/disable the window Parameters BOOL enabe TRUE=enable, FALSE=disable ═══ 3.134.14. XWindow::EnableWindowUpdate ═══ Remarks Enable/disable window-update Parameters BOOL enabe TRUE=enable, FALSE=disable window-update ═══ 3.134.15. XWindow::GetSysValue ═══ Remarks Query a system-value Parameters LONG id of the value (SV_* see OS/2 documentation) Return-Value LONG value ═══ 3.134.16. XWindow::GetWindow ═══ Remarks Find a child-window with the given ID Parameters ULONG theID ID of the window to find Return-Value XWindow * pointer ═══ 3.134.17. XWindow::GetWindowID ═══ Remarks Query the ID of the window Return-Value SHORT theID ═══ 3.134.18. XWindow::Invalidate ═══ Remarks Invalidates the window content, it will be redrawn Parameters BOOL childs TRUE=childs of the window are invalidated too FALSE=childs are not invalidated ═══ 3.134.19. XWindow::IsVisible ═══ Remarks Query if the window is visible Query if the window is visible or not Return-Value BOOL BOOL result ═══ 3.134.20. XWindow::QueryWindow ═══ Remarks Find a window with the given relationship ULONG relationship: ┌────────────────────────────────────────┐ │WIN_NEXT │ ├────────────────────────────────────────┤ │WIN_PREV │ ├────────────────────────────────────────┤ │WIN_TOP │ ├────────────────────────────────────────┤ │WIN_BOTTOM │ ├────────────────────────────────────────┤ │WIN_OWNER │ ├────────────────────────────────────────┤ │WIN_PARENT │ ├────────────────────────────────────────┤ │WIN_NEXTTOP │ ├────────────────────────────────────────┤ │WIN_PREVTOP │ ├────────────────────────────────────────┤ │WIN_FRAMEOWNER │ └────────────────────────────────────────┘ Return-Value XWindow * pointer ═══ 3.134.21. XWindow::SetOwner ═══ Remarks Set a new owner for this window Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │the new parent │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.134.22. XWindow::SetParent ═══ Remarks Set a new parent for this window Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow * │the new parent │ ├────────────────────┼────────────────────────────────────────┤ │BOOL │redraw the window │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.134.23. XWindow::GetPointerHandle ═══ Remarks Returns the handle of the actual pointer. Return-Value OOL_POINTERHANDLE handle ═══ 3.134.24. XWindow::GetPointerPos ═══ Remarks Returns the position of the pointer Parameters XPoint * point buffer to hold the datas ═══ 3.134.25. XWindow::GetSystemPointerHandle ═══ Remarks Returns the handle of the pointer identified by theID. Parameters ┌────────────────────┬────────────────────────────────────────┐ │LONG theID │ID of the needed pointer. Valid values │ │ │are: │ │ │PTR_ARROW │ │ │PTR_TEXT │ │ │PTR_WAIT │ │ │PTR_SIZE │ │ │PTR_SIZENWSE │ │ │PTR_SIZENESW │ │ │PTR_SIZEWE │ │ │PTR_SIZENS │ │ │PTR_MOVE │ │ │PTR_ILLEGAL │ ├────────────────────┼────────────────────────────────────────┤ │BOOL copy │If you need a copy of the pointer (to │ │ │modify it) set copy TRUE, otherwise │ │ │FALSE. │ │ │ Default is FALSE. │ └────────────────────┴────────────────────────────────────────┘ Return-Value OOL_POINTERHANDLE handle ═══ 3.134.26. XWindow::SetPointer ═══ Remarks Set the actual pointer. You can receive a pointer-handle by calling GetSystemPointer() or load a pointer from a resource with XResourceLibrary::LoadIcon. Parameters OOL_POINTERHANDLE handle the pointer ═══ 3.134.27. XWindow::GetUpdateRect ═══ Remarks Get the rectangle which should be redrawn Parameters XRect * rect buffer ═══ 3.134.28. XWindow::SetSize ═══ Remarks Set the size and/or position of a window Set the size and position of the window Parameters ┌────────────────────┬────────────────────────────────────────┐ │ULONG │xPosition │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │yPosition │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │width │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │height │ └────────────────────┴────────────────────────────────────────┘ XRect * rect new size and position ═══ 3.134.29. XWindow::DoMove ═══ Remarks DoMove informs the application if the window is moved. Override this function if you need this information. ═══ 3.134.30. XWindow::DoSize ═══ Remarks DoSize informs the application if the window is resized. Override this function if you need this information. Parameters XSize * size ═══ 3.134.31. XWindow::GetSize ═══ Remarks Query the size and position of the window Parameters XRect * rect buffer to hold the datas ═══ 3.134.32. XWindow::SetBottom ═══ Remarks The window is set to the bottom in z-order ═══ 3.134.33. XWindow::SetTop ═══ Remarks The window is set to the top in z-order ═══ 3.134.34. XWindow::Show ═══ Remarks Show/hide the window Parameters BOOL show TRUE=show, FALSE=hide ═══ 3.134.35. XWindow::GetStyle ═══ Remarks Query the current style of the window. Return-Value ULONG style ═══ 3.134.36. XWindow::SetStyle ═══ Remarks Set the style of a window Parameters ULONG style the new syle (depending on the type of window) ═══ 3.134.37. XWindow::GetText ═══ Remarks Query the text of the window Parameters XString * buffer buffer to hold the text ═══ 3.134.38. XWindow::GetTextLength ═══ Remarks Query the length of the windows text Return-Value LONG length ═══ 3.134.39. XWindow::SetText ═══ Remarks Set the text of the window Parameters char * text text to display ═══ 3.134.40. XWindow::DoCommand ═══ Remarks If the user selected a XPopupMenu or if the user pressed a button which is attached to a window, this function is called. To get the ID of the command the user requested, override this function. Return TRUE if you have handled the command, otherwise return FALSE. If you return FALSE the command is posted to the owner of this window. Parameters LONG theCommandID the ID of the menuitem/toolbar-button Return-Value BOOL handled ═══ 3.134.41. XWindow::DoControl ═══ Remarks If the user has done some interaction with a window this function is called. To get information about the event, override this function, the parameter holds information of your interest. Parameters XControlEvent * pointerOfEvent a pointer to an instance of XControlEvent ═══ 3.134.42. XWindow::DoSysCommand ═══ Remarks If the user selected a command from the sytem-menu or chosed a button of the titlebar a syscommand is send to the window. Return TRUE if the action can be performed by the OS, otherwise return FALSE. Parameters USHORT theCommandID SC_CLOSE, SC_RESTORE etc, see OS/2 API documentation Return-Value BOOL handled ═══ 3.135. XWizClientWindow ═══ Overview Functions constructor/destructor  XWizClientWindow constructors/destructors  XWizard misc  Init navigation  SetNextPage  SetPrevPage  ShowNextPage  ShowPrevPage ═══ 3.135.1. XWizClientWindow overview ═══ Parent class: XResourceWindow Overview XWizClientWindow is a window which is used in XWizard. Unlike XResourceWindow it posts events received in DoCommand() and DoControl() to the owning XWizard. ═══ 3.135.2. XWizClientWindow::XWizClientWindow ═══ Remarks Create a resource-window Create a resource-window Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWizard * │owner │ ├────────────────────┼────────────────────────────────────────┤ │XResource* │resource │ └────────────────────┴────────────────────────────────────────┘ ┌────────────────────┬────────────────────────────────────────┐ │XWizard * │owner │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │ID of the window-resource (the resource │ │ │must be linked to the exe-file) │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.135.3. XWizClientWindow::XWizard ═══ Remarks Create a wizard Parameters ┌────────────────────┬────────────────────────────────────────┐ │XWindow* │owner │ ├────────────────────┼────────────────────────────────────────┤ │ULONG │resource-id │ └────────────────────┴────────────────────────────────────────┘ ═══ 3.135.4. XWizClientWindow::Init ═══ Remarks Start the wizard ═══ 3.135.5. XWizClientWindow::SetNextPage ═══ Remarks Set the following page to display in the XWizard Parameters XWizClientWindow * the next window ═══ 3.135.6. XWizClientWindow::SetPrevPage ═══ Remarks Set the previous page to display in the XWizard Parameters XWizClientWindow * the next window ═══ 3.135.7. XWizClientWindow::ShowNextPage ═══ Remarks Show the next page which is specified in the current displayed XWizClientWindow. Return-Value BOOL success ═══ 3.135.8. XWizClientWindow::ShowPrevPage ═══ Remarks Show the previous page which is specified in the current displayed XWizClientWindow. Return-Value BOOL success ═══ 3.136. XWizard ═══ Overview ═══ 3.136.1. XWizard overview ═══ Parent class: XModalDialog Overview XWizard is a class to implement a dialog with multiple pages as they are used for 'Wizards' or 'Assistants'. Usualy you create an empty dialog-template and set a XWizClientWindow as a start page. The you define for the start page which page to display next (see XWizClientWindow::SetNextPage()), you can decide at runtime, which page should be displayed. To start the wizard call Init(). If the last page is reached you perform the complete action your wizard is designed for. ═══ 3.137. voidXCoordinateSystem ═══ Overview Functions  Convert ═══ 3.137.1. voidXCoordinateSystem overview ═══ ═══ 3.137.2. voidXCoordinateSystem::Convert ═══ Remarks Map a coordinate to Windows/Java-Coordinates and back Parameters ┌────────────────────┬────────────────────────────────────────┐ │XRect* │input/output coordinates. If the │ │ │coordinates are in Warp-coordintates │ │ │they are transformed to Windows/Java, │ │ │otherwise they are transformt back │ ├────────────────────┼────────────────────────────────────────┤ │XWindow* │Window to calculate relative to. If NULL│ │ │the coordinates are calculated relative │ │ │to the Screen (default is NULL). │ └────────────────────┴────────────────────────────────────────┘ ═══ ═══ To contact the authors of the OOL send a mail to OOL-list@wg.saar.de or send a mail to StefanVonBrauk@gmx.net respectivly thomas@ghecko.saar.de