Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Sc0rch is currently offline  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?
  • Attachment: FormEditor.rar
    (Size: 1.01MB, Downloaded 263 times)
  • Attachment: Example.rar
    (Size: 1.00MB, Downloaded 260 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Proposal: add IsReadOnly() handling inside ButtonOption
Next Topic: Is there an example/links how to use X11 DHCtrl?
Goto Forum:
  


Current Time: Fri May 10 13:22:50 CEST 2024

Total time taken to generate the page: 0.01759 seconds