Not really an alternative “menu”, simply denote to evaluate ON DBLCLICK event in TREE.
Since NODE and TREEITEM statements does not have any event definition, event management in TREE require a little different way.
Download here ( source only ).
Not really an alternative “menu”, simply denote to evaluate ON DBLCLICK event in TREE.
Since NODE and TREEITEM statements does not have any event definition, event management in TREE require a little different way.
Download here ( source only ).
Reinvention of wheel ?
Not quite …
Main difference is allowing file(s) and folder(s) selection together.
Another difference is implementing of <lNoChangeDir> parameter. Unlike GetFile(), GetDIRList() uses this value for allowing change directory ability to user.
Furthermore sorting grid columns by three (not two) ways, GetVolumLabel(), List2Arry() and Arry2List() functions may be useful.
Also, test program ( TestGDL.prg ) may be a sample for .fmg based application.
Download here ( source only ).
BROWSE is a control a few complicated than others. However HMG-IDE successfully support it.
In this sample we will build a Browse based application in a few steps using HMG-IDE.
Step – 1 : Make a folder for this sample.
Step – 2 : Copy TEST.DBF and TEST.DBT from \hmg\SAMPLES\TUTORIAL folder to your new folder.
Step – 3 : Run HMG-IDE and chose “New Project”.
IDE will ask you location and name for the new project; denote the folder you had build in the first step and give a name, say “IDEBrowse”.
IDE will build a new main module named “Main.Prg” and a new main form named “Main.fmg”
Step – 4 :
Double click “Main.prg” in the “Modules” tab of “Project Browser” window for editing this “main” module:
IDE send this module (.prg) file to your programing editor.
You will see your main program written by IDE :
#include <hmg.ch>
Function Main
Load Window Main Main.Center Main.Activate Return
Step – 5 :
Since BROWSE is a table based control, we must have a table and files opening/closing routines; these aren’t duties of IDE.
So add this two little procedures to the main.prg for opening and closing table:
Procedure OpenTables() Use Test Shared Return Procedure CloseTables() Use Return
Step – 6 :
Now, it’s time for making some arrangements on the form:
Title :
– Click “Object Inspector [Main.Fmg]\Form\Properties\Title” :
– Give a “Title”, say “IDE Browse Sample” to form :
On Init Procedure :
– By clicking “Object Inspector [Main.Fmg]\Form\Events\OnInit” ;
– Assign OpenTables() procedure name to this event:
On Release Procedure :
– By clicking “Object Inspector [Main.Fmg]\Form\Events\OnRelease”;
– Assign CloseTables() procedure name to this event:
Step – 7 :
Now, we can place BROWSE control in our form:
– Click BROWSE button in the Toolbox:
– Then click anywhere in the form :
– Re-size control by dragging “resize” mark at the lower rigth corner :
– If required, change placement of control by using “replace” mark ( at the upper-left corner )
– By using these two marks, you can place control in the form whatever you like:
Step – 8 :
And now, we will make some arrangements on the BROWSE control :
After activating ( by clicking on it ) BROWSE control;
By selecting “Object Inspector[Main.Fmg]\Browse_1\Properties” give these properties to Browse_1 control:
– “Fields” property :
{‘Test->Code’,’Test->First’,’Test->Last’,’Test->Birth’,’Test->Married’,’Test->Bio’}
– “Headers” property :
{ ‘Code’, ‘First Name’, ‘Last Name’, ‘Birth Date’, ‘Married’, ‘Biography’ }
– “Widths” property :
{ 150, 150, 150, 150, 150, 150 }
– “Work Area” property :
Test
Note that “array” properties requires open and close curly-braces (‘{}’), character properties doesn’t requires quotation marks (“”).
.
If you want allow editing abilities to user, you have change default values (.F.) of these properties to .T.
ALLOWEDIT
ALLOWAPPEND
ALLOWDELETE
Last Step :
That is All !
Click “Run” button ( or select “Run” from Project menu or simply press F5 key) for see results :
You have now a BROWSE based HMG application generated by IDE.
When you use “Run” command or attempt to closing your form by clicking “X” button, IDE ask you saving it ( if any change you have made ). You may also use Project\Save Form menu command.
Since IDE is a “Two-Way Form Designer”, you can edit .fmg files by double clicking its name in the “Forms” tab of “Project Browser” window.
And since .fmg files are pure HMG source code, you can open a .fmg file by your editor to see form source code generated by IDE. Inspecting this code may be useful for better understanding and learning HMG.
You can also edit this file manually, but under your own risk ! Some modifications may not suitable to the standards of Form Designer.
Hexadecimal file viewer.
This is a experimental project with first intend of point out the power of Harbour and HMG. So, HexView is considerably slow on large files, please be patient.
Download here ( source only ).
Two functions for drives & folders invoking. May be usefull for backing up and other purposes.
Download here ( source only ).
MsgMulti ( aka MsM) is a message function accept multiple and any type of data.
Download here ( source only ).
Harbour MiniGUI Integrated Development Environment is a comprehensive and highly sophisticated project management and form design tool. It is also extremely facilitated to easily use. HMG-IDE has four windows:
You may use IDE for project management, for form design purpose or for both.
The main window is constituted on a menu bar and a tool box, having many command buttons with descriptive tool tips. This tool box may consider two sections: project management tools and form design tools. Form design tools are divided into a “main controls” area and a “builders” area.
The project management tools allow you all project based works with interactive manner. This includes building and running projects without complex batch processing and environment configuration tasks. Project management tools buttons are:
The Project Browser window’s tabs:
You can view, select and inspect all project elements in this window. Whenever you add or exclude a project element (module (program source file), form, resource, report …), IDE automatically updates the project browser.
The Object Inspector window is for view and change properties and events of GUI elements in your forms.
You can observe and modify properties and events value of graphical elements of your form in the Object Inspector window.
The form window is a chalk board for designing forms and directing its graphical elements. New or existing, when you open a form, this windows also opened by IDE. With only two clicks you can easily place controls on your form: the first on desired button of control in form design tool box and the second one is anywhere in form you like. After placed, you can resize and change its place by dragging.
In GUI programming jargon, GUI elements are called as control. HMG offers tons of controls and HMG-IDE successfully supports all of them.
At the beginning you have a form (window) and then you can easily replace any control onto this form. Simply click button of control to used, and then click any place on form to indicate placement (upper left corner) of control.
In short, you can build a complete form by only two clicks for each control. For example, suppose that we want putting an image control on our form; the button of image control is here:
First click this “image” button the toolbar of HMG-IDE, and then click anywhere in the form. This clicked point in the form, will be left upper corner of control; in this case : image.
This isn’t image itself, only a place-holder for image control.
When you placed a control in your form, IDE assign default values to its properties and events.
You can change the placement of control dragging by mouse with upper left corner ( point no: 1) of this place-holder and resize it with lower down corner ( point no: 2 ).
As first placed and whenever you select (click) any control in the form, this control come active in Object Inspector. And as following on Object Inspector, every control has many properties and events. Since IDE assigned default values to all properties and events of that control, we don’t have learning meaning of all of them, at least at the beginning.
Whenever you change these values interactively on the form, IDE also updates them internally. You can observe and modify them in the Object Inspector window. HMG forms are designed “two way” manner. Saved in a readable format; in fact they are pure HMG source codes, neither binary nor cryptic. You can separately open, inspect and also modify them. When opened by IDE, they are automatically converted to visual form.
Yes, you can edit .fmg file out of HMG, via any text editor when necessary. But please be careful, some points may be left out standards of IDE, though they have legal syntax.
IDE Toolbar ( indicated in above image by “Form Design Tools” ) has a button for each control. Every button has its own tool-tip; when mouse cursor keep over a button, tool-tip become visible and say name of this control.
Anyway here long name of all control is here:
HMG-IDE has several builders for some relatively complex controls: You can use these features for placing appropriate controls in your form:
( By Roberto Lopez, builder of HMG )
Well.. for the new people approaching HMG I can say that this is a mix between one of the best programming and data manipulation languages ever created (xBase) and the VB/RapidQ GUI handling style.
All GUI object are public and can be created and managed with very simple code.
The basic components of HMG are:
– Harbour Compiler (generates C code from xBase code).
– Harbour MiniGUI library (functions and preprocessor directives to handle GUI).
– MingW Compiler.
– Harbour MiniGUI IDE (Optional tool for two-way visual design).
What are the main project goals ?
To keep the GUI handling as easy, elegant and clean as possible and the
library core as compact, stable and reliable as we can.
It implies, that the changes to the core will be subject to very strict test
prior tag a specific build as ‘stable’.
Other of the main goals is to hide the complexities associated with the
operating system internals, allowing to the programmer, focus on his
application, instead OS technical things.
So, what is the place for experimentation and exciting new ‘things’ ?
The User components interface, of course.
I’ve created to let to any HMG user to add fully new GUI elements, or add
properties and events to existing ones.
Where is the HMG site ?
http://harbourminigui.googlepages.com
Where can I download HMG ?
http://harbourminigui.googlepages.com
Why Roberto doesn’t answer my messages ?
I have a very little free time for HMG right now. Anyway I’m reading
and answering the Sorceforge’s HMG bug tracker and Wish tracker,
almost daily, please use it.
Does HMG will be ‘real’ OOP some day in the future ?
Who knows
What about user contributions?
I’ve noticed about comments like “Roberto does not accept code contributions
anymore“.
This is true, but need some clarification.
In 2005 I’ve decided to change the way I work on minigui.
From that moment I do all modifications to the library personally, but I still receiving comments, suggestions ideas and wishes from the users.
The reason for this, is that I want to keep the control of the code included in the library, to assure that it remains compact, fast, stable, reliable and backwards compatible, keeping and eye on general project goals (enumerated in the previous message).
An example of this, is the recent Activex addition.
I’ve noticed that this feature was incorporated to the Freewin project.
I’ve analyzed the code, learned how it works ant then rewrote it
from the scratch to suit minigui library needs.
This way, I’m not incorporating a ‘black box’ to the library that
could be difficult or impossible to fix or modify. I’m incorporating
code that is simple and easy to maintain.
I can make mistakes and write buggy code (of course) but there is a big possibility that I’m be able to fix it, since I’ve wrote it.
So, You can send to me (to HMG wish tracker at SourceForge) sample code with your propossed addition. I’ll take a look at it.
What about other MiniGUI based projects… ?
Why do not all MiniGUIs guys unite and work together ?
I’ll could add another question:
Why the humanity does not unite and work together?
Well… I apreciate and respect a lot to Grigory, Jacek and Janusz from MiniGUI Extended and to Ciro and Vicente from OOHG. All of them are doing a great work, but simply we have different opinions about of what MiniGUI has to be. Thats all.
This is very good for users, since they have three alternatives to choice.
I feel very honored because two new projects emerged from my original work.
Why do not add to library a nice widget that do something… ? it could be good for my application that needs it.
I could write now a long explanation about the need that the features added to the core library must be generic, designed to fill the needs of most common programming situations and not to solve a specific user’s problem.
Fortunately you could get the Simpsons episode 7F16
In this episode Homer designs a car to suit his own needs. Of course, the car was a monstrosity very expensive and (of course) a complete failure.
Perhaps there is no need to watch the episode to get the idea, maybe that this image be enough:
If the idea is not clear enough yet, here is a little explanation:
Adding lot of things, designed to suit specific (very unusual situations) to the library core, will give us a fat, slow, buggy and difficult to learn GUI system. I’ll avoid it as much as I can.
Why do you don’t release the HMG IDE source code?
Which are your obscure intentions about it?
IDE is a very big application. It has about 41000 lines of code.
To make it run faster it relies heavily on MiniGUI library internals and some C code to cover low level things not implemented on the library.
Since it relies on library internals, sometimes, modifications to library, obligate to me to make changes (usually extensive) to IDE code.
IMHO these (and other things) turn this project into a personal one, not suitable to make its code public.
Anyway, I not discard the possibility to make the code public in the future.
I can only assure that IDE will always be FREELY DISTRIBUTED as freeware.
There is no evil intentions behind this decision
Maybe there is a problem (not fully specified) with control XXX
but I’m not sure. Can you fix it please?
My application is not working as expected. I’ve attached to the message all app 5000 lines of code. I guess that must be an HMG problem, please solve it.
Ok. I’ll say once again
I cannot analyze a presunct bug based on a tale about it, or read a thousand lines app to attempt to find it. It is very time consuming and inefficient way to go.
Please, send me a simple sample showing the bug, to SourceForge HMG bug tracker. The sample must include all necessary files to compile and run it.
If you are not able to reproduce the problem in a small sample, is highly probable that be not an HMG problem, but a error in your app.
Do you accept donations?
In early 2004, the total suscriptors in all MiniGUI forums was more
than 1500.
I’ve took about three hours a day (sometimes more) to answer all the messages directed to me with help requests.
So, I’ve think that request for donations from the MiniGUI users could be a good idea. It could allow to me, dedicate full time to the project, filling the needs of those using the library to develop professional apps.
Sadly, with the exception of a small group of users, there was no
significant response.
Some time later, I’ve decided to remove donations request from the HMG releases due to the lack of interest from the users.
Based on that experience, I have no plans to do it again.
Regards,
Roberto.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Notes :
1. This article dated to 2008, current address of main HMG site is HMG_Forum and here download page. Also look at “Home page” of HMG for latest announces.
2. This article borrowed courtesy of author from HMG_Forum.
3. Do you like HMG ? If so, don’t forget this !