GUI Builder?

While I’m at it - are there any plans for a gui builder for root ?

(And before you suggest it - no, I’m not volunteering :wink:)

elc

We are actively working on the ROOT GUI builder.
We expect to come with a first iteration when we will make the first development release 4.01/02 end of August.

Rene

WOW - I’m massively impressed - can’t wait !

Why wait, you can try ROOT with Qt layer right now (with ROOT 4.00-08a)

See root.bnl.gov
You can find the working Qt project there as well
root.bnl.gov/QtRoot/QtRoot.html#designer

Dear Valeriy

I understand your enthusiasm with regard to your Gui builder very much,
and I am eager to try it :smiley:

However, like Valeri, I am wondering about your claim to be superiour
to TrollTech :confused:

Even though I know that you will not like it, I cannot resist to point you
to the following Trolltech site: doc.trolltech.com/3.3/qtable.html

Best regards and do not take me too seriously
Christian

Hi guys,
I’m sorry for posting this message (too early)
… and of cause too optimistic …

Regards. Valeriy

Hi,
alfa version of GUI Builedr is released.

The GUI Builder: new class TGuiBuilder
ROOT GUI Builder principles
You can start the builder from the canvas Inspect menu. With the GUI builder, we try to make the next step from WYSIWYG to embedded editing concept - WYSIWYE (“what you see is what you edit”). The ROOT GUI Builder allows modifying real GUI objects. For example, one can edit the existing GUI application $ROOTSYS/tutorials/guitest.C. GUI components can be added to a design area from a widget palette, or can be borrowed from another application. One can drag and and drop TCanvas’s menu bar into the application. GUI objects can be resized and dragged, copied and pasted. ROOT GUI Builder allows changing the layout, snap to grid, change object’s layout order via the GUI Builder toolbar, or by options in the right-click context menus. A final design can be immediatly tested and used, or saved as a C++ macro. For example, it’s possible to rearrange buttons in control bar, add separators etc. and continue to use a new fancy control bar in the application. The following is a short description of the GUI Builder actions and key shortcuts: o Press Ctrl-Double-Click to start/stop edit mode o Press Double-Click to activate quick edit action (defined in root.mimes)
Selection, grabbing, dropping
It is possible to select, drag any frame and drop it to any frame
Click left mouse button or Ctrl-Click to select an object to edit.
Press right mouse button to activate context menu
Mutiple selection (grabbing):
draw lasso and press Return key
press Shift key and draw lasso
Dropping:
select frame and press Ctrl-Return key
Changing layout order:
select frame and use arrow keys to change layout order
Alignment:
draw lasso and press arrow keys (or Shift-Arrow key) to align frames
Key shortcuts
o Del - delete selected frame
o Shift-Del - crop action
o Ctrl-X - cut action
o Ctrl-C - copy action
o Ctrl-V - paste action
o Ctrl-R - replace action
o Ctrl-L - compact layout
o Ctrl-B - break layout
o Ctrl-H - switch horizontal-vertical layout
o Ctrl-G - switch on/off grid
o Ctrl-S - save action
o Ctrl-O - open and execute a ROOT macro file. GUI components created
after macro execution will be emebedded to currently edited
design area.
o Ctrl-N - create new main frame

Check it. Comments?

Regards. Valeriy


Dear Valeriy

A couple of days ago I tested GuiBuilder and it looks very promising.
But, as you mention, it is an early alpha version and I encountered
the following problems:

1, I could not figure out how to start guibuilder from within root?
Analogously to “TBrowser b” I tried “TGuiBuilder b” but got an error:
Error: Symbol TGuiBuilderb is not defined in current scope FILE:(tmpfile) LINE:1

2, When adding a TGTextButton after creating a main frame I tried to
change the button name in the “Properties” panel at the right side.
Sorrowly, this did not change the name. It would be great if you could
change it in the “Properties” panel and if this panel would contain an
"Apply" button to apply these changes.

When clicking on TGTextButton, a dialogbox opens, where I can change the name, but this results in the following error:
root [1] (class TGuiBldTextDialog*)0x3999040
Error in : BadWindow (invalid Window parameter) (XID: 20972411, XREQ: 61)

This error causes a fatal crash of root, I have to kill root.
Currently, I always get this error, thus being unable to try GuiBuilder.
(Normally, I do not get this error, and in the very seldom cases it never
caused root to crash!)

Best regards
Christian

Hi Christian,
1.
thank you for reporting this, I’ll investigate.
Gui builder is “a piece of art” ported to all platforms
(took from me too much). Once appeared it will get rid
of such bugs (with your help :slight_smile: )

A string in the “Properties Panel” is name of widget
which will be in source after “Save As” action.

To change TGtextButton string use “quick edit action”

  • double click (like in Qt designer).
    Quick edit action is defined in root.mimes file,
    so anybody can customize it.
  1. (XID: 20972411, XREQ: 61)
    I will check it. Most probably such an error is result of
    "not correct deallocation". In ROOT Gui one should
    care to garbage widgets by himself.
    I have a code (which was initially a part of GUI builder)
    which alow to do so called “hierarchical cleaning”.
    “hierarchical cleaning” will allow to clean up all
    widgets/layout_hints at the main frame “destruction time”.

No, cleanup_lists, garbage_collectors will require …
just delete top level frame … and all subframes will be
automatically deallocated. Hopefully it will appear in next release.
Actually, GUI builder depends on such mechanism.

Regards. Valeriy

Hi Christian,
from your message I didn’t understand
on which platform that’s happened (MacX? tiger?).

Regards. Valeriy

Dear Valeriy

Thank you for your explanation, I am looking forward to the next version.

ad 2) If the Properties panel is only intended to show the name of e.g.
TGTextButton, then you should probably disable the possibility to edit it.

P.S.: I tested GuiBuilder on root CVS from 20 Sept 2004 on MacOS X 10.3.1.

Best regards
Christian

Hi Christian,
(XID: 20972411, XREQ: 61)
fixed, must be in CVS.

Regards. Valeriy

Dear Valeriy

I have just downloaded the new version, and now the problem is
indeed fixed. However, I encounter new errors. When trying to
save a simple layout, nothing is saved, but I get the following
error:
Root > (class TGuiBldTextDialog*)0x3bc1110
(class TGuiBldTextDialog*)0x3bcf260
(class TGuiBldTextDialog*)0x3bd0250
(class TGuiBldTextDialog*)0x3bcef30
(class TGuiBldTextDialog*)0x3bcf240
(class TGuiBldTextDialog*)0x3bd0390
(class TGuiBldTextDialog*)0x3bcfd50
C++ macro file test.C has been generated
*** malloc[28881]: error for object 0x3bcfa50: Incorrect checksum for freed object - object was probably modified after being freed; break at szone_error

Best regards
Christian

Hi Christian,
there were some mods in TGMainFrame::SaveSource which
broke GuiBuilder. That was fixed yesterday evening.
Could you check it again against CVS head :question:

Thanks. Regards. Valeriy

++
I just introduced hierarchical cleaning to ROOT code.
I hope that will make GuiBulder more robust.

Dear Valeriy

I have just downloaded the new root version from CVS.

1, I can now save the gui as macro, however, I can only save it in the
current working directory, even when I try to save it in a different
directory, it is always saved in the working directory.

2, I created a simply gui with a main frame, a group frame and two
checkboxes. However, I realized that I can only resize the checkboxes
intiallly but not later. When I activate a checkbox I can see the handles,
but when I try to move a handle it is no longer in front, so that I am
unable to resize the checkbox again.

Best regards
Christian

Hi Christian,
thanks for reporting it. Be fixed asap (tomorow).

Regards. Valeriy

Hi Christian,
the problem 1 is fixed. Thanks!
The problem 2 seems to be a normal
behaiviour. For many ROOT widgets resizing
must forbidden : textentries, numberentries,
textbuttons, check, radio buttons, labels etc.
They have default size defined by the size of text font.
Anyway , thanks , I/we will try to find solution.

Regards. Valeriy