https://vahidmy.blog.ir/post/680




Wizards ..

 


The Wizards Concept


A Wizard is a Visual Designer Interface that creates a Source Template to be pasted into a client Source.


RosAsm Wizards are independent PE files, to be located in the [RosAsmFiles] Folder, aside the Equates Files, the Interactive Visual Tutorials, and friends. For now, only one Wizard is available, and is still under development, the Form Wizard.


You can run the Wizards either by the [Wizard] Menu Item, for fresh new creations, or you can re-edit an existing Wizard Template, by Right-Clicking upon the associated 'Tag' Comment in the source code.



The Wizards Templates


When leaving the Wizard, the edited Template is pasted inside your Source, at the actual position of the Cursor. A Template always begins by, for example:


; Tag Wizard Form 'FileName'


... and ends with:


; Tag End


You should never remove, or even modify, these Comments and the in-between Sources, if you wish to keep the re-edition possibility. Modifying something inside the Template Source will be erased by a re-edition.


Because of this difficulty, you should always paste your Wizards Templates at the end of your Source, in a dedicated TITLE, in order to make sure that you will never accidentally modify them. The Source Editor has actually no security implemented to save you from such accidents.



The actual Form Wizards


This first Wizard is still under development and is actually used to study, define and finalize the exchange mechanisms between the Source Editor and the Wizards. It is fully effective, but will probably be improved and extended. 


The purpose of this Form Wizard is to visually edit the windows interface of a Program, a bit similar to what the Resources Editor does, but in a more powerful and flexible manner as, in this case, the creations are not based on Dialogs, but on the 'CreateWindow' Function.



The Form Wizards Files


The Window Wizard File (*.wwf) format is used to store all information about a form.


See the Wizard source code for additional information on the file format (TITLE Help).



Wizard Global Introduction


Drawing


All drawing actions can be done with the mouse.


Once you have drawn a control, you can move it by a simple drag-and-drop.


A right-click on one of the controls will display a context menu which provides quick access to Edit menu options.



Properties


The properties window allows you to modify all the styles available for a given control.


(Window Tab for window styles, WindowEx Tab for extended window styles and Control Tab for control specific styles)


The A-Z Tab contains additional information:


The Name of the control as it will appear in RosAsm Source

The Caption of the control

The client coordinates of the control.


Code writing


You can output the code corresponding to your form in several ways. (All these options are available in the Output menu)


Display it in a pop-up window. 

Write it to a file.

Paste it into RosAsm.



Menu


File 

New : Create a new form

Open : Open a new *.wwf file

Save : Save the current form

Save As : Save the current form with new name

Edit

Bring To Front : Bring the control to the top of the Z-Order.

Send To Back : Send the control to the bottom of the Z-Order.

Delete : Delete the current selected control(s).

Lock Controls : Lock control position.

Output

Display

The whole code : Display in a pop-up window the code corresponding to the current form.


Current control code : Display in a pop-up window the code corresponding to the current selected control (the one with yellow squares).


Write in file : Write in a file the code corresponding to the current form.


Paste in RosAsm and quit : Paste into RosAsm the code corresponding to the current form, save it in a file and close the wizard.



Requirements


The wizard uses a file so as to store all the window and control styles. 


The file rwslist.dat is a raw list of all available styles with only basic information. You can get more information about this file in the Wizard source (TITLE Help).



~~~~~~~