Leprechaun dialog creator v1.1

This addon was made to make it easier for newbie scripters
to understand how dialogs are built up, and help them create simple
dialogs. It only helps with creating the graphical display.
Use the mIRC help file to learn about the /did command and the
$did identifier.

An example project is included to show how this dialog creator works
To view this, select Leprechaun Dialog Creator -> Open Project (menubar).
A dialog will then pop up with the projects. Select Example.
When the Dialog interface editor has finished loading,
right click and select Get Source. In the @DialogSource 
window you can right click and select Run to view the dialog.

IMPORTANT:	Make sure you read the rest of this file  (the changes section)
		before you start, as this may make it considerably easier to 
		use the creator.

Loading the file:
You really should know this, but... to load the file type /load -rs [subdirectory]\ldc.mrc

NOTE:	This addon was created using a resolution of 1024*768.
	Using a lower resolution may cause problems.
NOTE2:	You should not have windows maximised when you use this addon.
NOTE3:	If you size the @DIA to be bigger than the size at start, the expanded
	area will be white (or the default background colour for mIRC).
	To fix this, simply refresh the layer (Click on Refresh in the popups).

The output of this addon (the dialogs that are made) can be used in whichever
ways you like, but I would be thankful if you could let the comment that it
was compiled by this creator remain in the file :)

Please mail or memo me comments or suggestions.

If you have any questions I can be found on DALnet.


Ymar_the_Leprechaun	(leprechaun@aurskog.net)


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-

Changes since v1.0 (latest additions)

	- Changed the events sections
		There is now only one events editor (Properties dialog).
		This is treated exactly as the mIRC remote editor, which
		means you have to use:
			on *:dialog.....

		The only thing which is possible with this editor, that
		mIRCs standard editor doesn't have is that it supports
		the use of id references (see changes since v0.3).
		These will be changed to the actual id during compile.

		The reason I did this is the fact that almost no one used
		the events as they were because the format used is not very
		effective (a single event for each id). Hopefully the new
		type will be more useful.
		(The single event per id is still used for menus, but should 
		not cause problems)

		(If you have problems understanding what I mean, take a look
		at the example project.
		
	- Changed the dialog id properties dialog
		It is now:
		- Much smaller
		- Visible all the time (if you want it)
		- Has check-boxes for styles
		- The possibilty of changing an id label
		- A layer selection combo
		  (The @Layers window has been removed)

	- Improved tab drawing algorithm
		Tabs should now not be refreshed as often as they
		used to be, resulting in easier movement of
		items inside tabs.

	- Added Drag&Drop Creation
		To create a new id you now select the type in the
		@Create New ID window, and draw it on the @DIA
		The value will reset itself after creation, because it
		is impossible to move/edit items when it is not set to 
		"None (Point)".

	- Fixed the sizing rectangle not being displayed on boxes

	- Changed the example project
		Added menus, to display how they are made.

	- Ordinary combo-boxes are now shown correctly.

Changes since v0.4

	- Added Tabs/Layers
	  If you want to create a dialog with tabs, do this:
	  
	  1.	Create a new id of the type TAB
	  2.	When you click OK, a new dialog will be open, the tabs dialog.
		This dialog can also be opened through popups (but only if you
		have a TAB did)
	  3.	Add the tabs you want by typing them in, and clicking ADD.
	  4.	When you have added all the tabs you want, close the dialog.
	  5.	Select "Layers" in the popup, to display a window listing all layers.
	  6.	You will notice that all the tabs are there in addition to hidden
		and main.
		By clicking on the layer name in this window, you will set the
		active layer to that layer. From there on, you all new ids will be
		placed in that layer.
	  
	  The Different types of layers:

		Main:	You should place all normal ids here (default layer)
		Hidden:	All ids in this layer will be hidden when you compile
			NOTE: You should use this layer instead of the hide style
		TABs:	All ids in these layers will be placed under the tabs when
			you compile.

	- Added a "sizer" portion of the dids, symbolised by a black (or whatever 
	  colour you have for text) rectangle.
	  When clicking and dragging this, you will size the dialog instead of 
	  moving it.
	  NOTE: You cannot change the height of drop-down combo boxes using this,
	  because of the way combo boxes are displayed. To change the height, set it
	  in the properties dialog for that box.

	- You can now load dialogs that you have already made.
	  To do this select Open Dialog from file in the menubar and select the file.
	  A list of all the dialogs in the file will be displayed.
	  Double-click on a dialog name to load it into the Dialog Interface
	  Editor. 
	  Events will NOT be loaded.
	  NOTE: The dialogs loaded may look very weird, and perhaps not like 
		the actual dialog.
		There are several reasons for this.
		
		1. The Dialog Creator makes things look exactly like they "should"
		   (according to the table). mIRC does not always do that to 
		   listboxes and the like.
		2. The size of text/radio/check boxes are shown with a shadow
		   outline. If a id has bigger H or W, than it is displayed in
		   the dialog, the DIA may look confusing because it shows the
		   real size.
		3. Menus
		   Menus are not added when opening a dialog from a file.


	   NOTE2:  You can load dialogs both from remote files based on *.ini and
		   remote files based on *.mrc.
	   NOTE3:  Make sure you are loading dialogs that function in mIRC.
		   Debugging should detect it when loading, but do not rely on it.

	- You can now use variables as the label for a did, without the compiler
	  ruining it.
	- You supply the character used to seperate multiple dids when using a
	  wildcard refrence. Usage wildcard,character
	  Example: icon.*,32 (This will return the dids seperated with 
	  character 32 (spaces) (i.e. did1 did2 did3)
	  If no character number is specified the compiler will default to commas 
	  (character 44)
	- Fixed error appearing when editing properties for a did through popups.
        - Fixed strip comments bug

Changes since v0.3


	- Hash tables are now used to increase performance.
	  The introduction of hash tables also allows you to make the events sections
	  a bit easier to comment.
	  Since the method of storing information has been changed,
	  old dialog projects can not be opened in this version
	  (Do NOT do this, because it may cause very weird things to happen)

	- References/Identifiers has been introduced
	
	  When you create a new dialog you have to set an identifier for that
	  id (i.e. close.button)
	  In the events sections you may later refer to the did of that button
	  by using the identifier surrounded by two s (i.e. close.button)
	  You can also use wildcards in these references to get a list of the
	  matching dids in the following format:

		did1,did2,did3.......
	  
	  NOTE: Direct DID references will probably not function, because the id
	  of the items are set when you compile the dialog.
	  (Because you now can decide how the dids shall be handed out)


Changes since v0.22

	- Fixed Ids not attaching to main window when right-clicking 
	  and not selecting anything
	- Block Adjustment fixed to 10 
	  (There wasn't any need for other options)

Changes since v0.21

	- Added support for menus
	  The dialog menu dialog uses the same syntax as mIRC popups
	  The creator can only create menus of up to 2 "levels"
	  (You cannot place a submenu within a submenu)

	  Menu1
	  .item1:commands
	  .submenu1
	  ..item2:commands

	  Menu2
	  .item3:commands

	  All commands must be on the sam line as the menu name:
		
		item1:command1 | command2 | command3  <- Correct 

		item1: { 			      <- Wrong
		  command1				 Placing commands like this
		  command2				 will result in errors when
		  command3				 running dialog.
		}  


	- Added support for boxes

	- Added block adjustment
	  Block Adjustment will align all the ids with the pixels specified
	  (i.e. x24y27 will be set to x20y30 if Block adjustment is on)
	  Block adjustment will ONLY apply to dialog ids being edited or moved
	  AFTER block adjustment is set.

	- Only the "main" box in a drop combo box will be shown when not selected.
	  The actual size of the box will be shown when you select it.
	  (This was done to make it easier to set dialog ids below the drop box)

Changes since v0.2

	- Changed the startup interface
	- Added option "Add to file" in Dialog source window
	- Removed unused aliases