HMG
xBase Development System For Windows
BASICS
HMG implements a semi-oop model. In my humble opinion, this model fits perfectly with xBase, because the goal of the original dBase creators was to obtain the maximum power with the minimum programming effort. This was the key for its tremendous success. In most cases, the xBase Windows products, consist of a xBase compiler tied to a standard OOP GUI engine, resulting in 'schizoid' languages, extremely easy to use in all aspects excepting the GUI. I've tried to create a GUI system consistent with xBase philosophy,without strictly regarding any standard programming paradigm. Some ideas of MiniGUI's semi-oop model were inspired by William Yu's outstanding Rapid-Q basic compiler. I want to publicly thanks to him for his brilliant ideas and open minded vision of computer programming science. Your First HMG Program I'll not be original, so this program will display a 'Hello World' message :) #include "hmg.ch" Function Main DEFINE WINDOW Win_1 ; END WINDOW ACTIVATE WINDOW Win_1 Return DEFINE WINDOW command: Will create the main window for the program. Win_1: Is the name of the window. AT 0,0: Indicates the window position (row=0,col=0) WIDTH 400: Means that the window will have 400 pixels width. HEIGHT 200: Means that the window will have 200 pixels height. TITLE 'Hello World!': Indicates the text in the window title bar. MAIN: Indicates that we are defining the main application window (a main window is required for all Harbour MiniGUI applications) ACTIVATE WINDOW Form_1: Will show the window and start the event The Traditional Approach You can change the windows (controls) behavior/appareance using a xBase In the example above, if you want change the window title, you can use MODIFY WINDOW Win_1 TITLE 'New Title' If you want to retrieve the window title: FETCH WINDOW Win_1 TITLE TO cVar The Semi-OOP Approach To do the same as above, you can use this semi-oop syntax: Win_1.Title := 'New Title' cVar := Win_1.Title -- |