Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Moving child ctrl, runtime, by mouse and keyboard
Re: Moving child ctrl, runtime, by mouse and keyboard [message #25465 is a reply to message #24747] |
Wed, 24 February 2010 21:25   |
Sc0rch
Messages: 99 Registered: February 2008 Location: Russia, Rubtsovsk
|
Member |

|
|
Hello! Sorry for delay.
New staff for testing!
FormEditor 0.2.3 supports:
- native view of widgets;
- resizing (corner-style, you can resize object/form/layout);
- dublicating (press the Ctrl-button, drag one object or group with right mouse button);
+ added serialization for main window (position);
* selection (select one widget, or (add to)/(toggle) selection, invert object/group selection);
view of group selection changed;
* dragging (one widget or group of widgets); you can now drag the group by any point inside (it will
be the option in next releases);
* storing GUI in xml-file; the xml-structure of file was changed;
* preview (there is a temporary file now named "FormEditor.view");
+ added support of child forms (add form-object, write path to form, apply changes);
+ added some operations to group of widget (just select the group and try the buttons: left click
aligns the objects, left click + Ctrl moves widgets to border);
+ added properties of the form (Form - Properties);
+ added basic storing and loading commands for layout-files (File menu);
+ added some dynamic properties for objects (not all of them).
Form 0.0.8:
- loading widgets and properties from xml-files;
+ children-forms;
+ scripting using Esc;
XML example:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE Form>
<Form width="300" height="260" align="left" valign="top" gridSizeX="10" gridSizeY="10">
<content>
<item x="10" y="40" cx="160" cy="220" align="1" valign="1">
<language id="EN-EN"/>
<name>Numbers</name>
<properties>
<property name="Frame" value="Default frame"/>
<property name="Type" value="Form"/>
<property name="PathType" value="Relative"/>
<property name="Path" value="Calc-Buttons.form"/>
</properties>
</item>
<item x="180" y="40" cx="110" cy="170" align="1" valign="1">
<language id="EN-EN"/>
<name>Operations</name>
<properties>
<property name="Frame" value="Default frame"/>
<property name="Type" value="Form"/>
<property name="PathType" value="Relative"/>
<property name="Path" value="Calc-Operations.form"/>
</properties>
</item>
<item x="20" y="10" cx="260" cy="30" align="1" valign="1">
<language id="EN-EN"/>
<name>Result view</name>
<properties>
<property name="Frame" value="Default frame"/>
<property name="Type" value="EditField"/>
</properties>
</item>
</content>
<language id="EN-EN"/>
<name></name>
<properties>
<property name="GridVisible" value="true"/>
<property name="GridBinding" value="true"/>
<property name="MaximizeBox" value="0"/>
<property name="MinimizeBox" value="1"/>
<property name="Sizeable" value="0"/>
<property name="ToolWindow" value="0"/>
<property name="ScrollContent" value="false"/>
</properties>
</Form>
List of ESC-functions (digit is the count of parameters):
ShowMessageBoxOK (2: title, message)
CreateForm (2: name, xml-file)
RemoveForm (1: name)
RunForm (1: name)
CreateVar (2: var, value)
RemoveVar (1: var)
SetVar (2: var, value)
GetVar (1: var)
SetWidgetData (3: form, widget, value)
GetWidgetData (2: form, widget)
ESC-script examples:
Initial script:
Main()
{
if (CreateForm("Calc", "Calc.form"))
{
RunForm("Calc");
}
}
Calculator script (not full):
OnInit()
{
CreateVar("Last", "0");
CreateVar("Buffer", "0");
CreateVar("Operation", "0");
CreateVar("NewNumber", "1");
SetWidgetData("Calc", "Result view", "0");
}
OnDrop()
{
RemoveVar("Last");
RemoveVar("Buffer");
RemoveVar("Operation");
RemoveVar("NewNumber");
}
SetBuffer(value)
{
SetVar("Last", GetVar("Buffer"));
SetWidgetData("Calc", "Result view", value);
SetVar("Buffer", value);
}
OnAction(action)
{
switch(action)
{
case "Clear": SetBuffer(0);
SetVar("Last", 0);
return;
case "+": if (GetVar("Operation") == "+")
{
SetBuffer( to_number(GetVar("Last")) +
to_number(GetVar("Buffer")) );
SetVar("Last", 0);
}
SetVar("Operation", action);
SetVar("NewNumber", "1");
return;
case "-": if (GetVar("Operation") == "-")
{
SetBuffer( to_number(GetVar("Last")) -
to_number(GetVar("Buffer")) );
SetVar("Last", 0);
}
SetVar("Operation", action);
SetVar("NewNumber", "1");
return;
case "*":
...
Please, test the editor and report the bugs!
Best regards and thanks for support!
Anton
P.S. Sorry, if some elements are not good for now! For example, the resizing of the main layout is not easy, and more else... Trying to fix!
P.P.S. Sorry for calculator script, it was created quickly with not very effective script system. Just for example.
P.P.P.S. I don't sure, create new topic for editor or not. What do you think?
|
|
|
 |
|
Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Fri, 29 January 2010 10:43
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: mrjt on Fri, 29 January 2010 18:45
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Sat, 13 February 2010 07:59
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Sat, 13 February 2010 09:33
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: fudadmin on Sat, 13 February 2010 09:40
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Sat, 13 February 2010 09:54
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: koldo on Sat, 13 February 2010 16:55
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: mirek on Mon, 15 February 2010 15:15
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Mon, 15 February 2010 16:00
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Wed, 24 February 2010 21:25
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Thu, 25 February 2010 10:21
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: koldo on Wed, 19 May 2010 12:46
|
 |
|
Re: Moving child ctrl, runtime, by mouse and keyboard
By: Sc0rch on Wed, 19 May 2010 16:20
|
Goto Forum:
Current Time: Sun Apr 27 17:15:19 CEST 2025
Total time taken to generate the page: 0.00871 seconds
|