Dialog Xtra version 1.0.3 Documentation
Copyright (c) 2000 Intermedia sp. z o.o.

Index :



What will Dialog Xtra do?

Dialog Xtra allows Multimedia developers to use several windows API dialog functions. Dialog boxes with one, two or three buttons, colour picker dialog, font dialog and contextual cascaded pop-up menus. The Dialog Xtra works with Director versions 6,7 and 8 in Windows 95/98/2000/NT environment.

back to toc

Sales

To purchase Dialog Xtra electronically please visit http://www.intermedia.pl/xtraen.php3 or order it by http://www.kagi.com All Intermedia Sp. z o.o. products can be purchased using all payment methods accepted by Kagi.com. All Intermedia Sp. z o.o. products are available in demo form to allow you to try them out before purchase, for this reason these products are not returnable or refundable.

For sales questions please contact zm@intermedia.pl


back to toc

Technical Support

Intermedia Sp. z o.o. provides support only through email. Questions will be answered as soon as possible. Please provide the product serial number with any questions.
If you have any suggestions or ideas concerning the product evolution, please e-mail to zm@intermedia.pl

back to toc

Legal Disclaimer

This software is provided without warranty of any kind.
Intermedia sp. z o.o. is not responsible for any damages, lost profits or any other problems implicated to this software. The software or its documentation may include errors.

back to toc

Licensing

The Xtra is serialized for identification. Purchasing the software allows the registered user to use software as an unlimited license in a Director application. The registered user has a licence to possess and use a single installed copy of the software. The registered user may not redistribute any serial numbers, documents, parts and files accompanying the Xtra.
The demo version of the Xtra is only for trial purposes. The demo may be freely redistributed, but including all parts and files.
Breaching licensing rights automatically terminates your right to use this software. Intermedia Sp. z o.o. will take any legal actions necessary for loss profits or violation of intellectual property.

back to toc

Version History

v. 1.0 - First Version March 31, 2000

v. 1.0.1 - April 22, 2000 - removing minor bugs

v. 1.0.2 -3.07.2000 - new function FileOpenDialog, FileSaveDialog

v. 1.0.3 -28.07.2000 - removing minor bugs reported by Thomas K. Laursen

back to toc

Dialog Xtra Function Reference

FontDialog object me

opens the font dialog window and user can choose font face, size, colour, style and effect. Functions returns list:

["Font",size,colour,"style","effect"]

FileOpenDialog object me, string flags, string filter creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open.
ALLOWMULTISELECT Specifies that the dialog box allows multiple selections.
""  
FileSaveDialog object me, string filter function creates a Save dialog box that lets the user specify the drive, directory, and name of a file to save.
ColorDialog object me

opens the color picker dialog window and the user can choose color. Functions returns list with RGB components for example [255, 255, 255] - white

MessageBox object me, string title, string msg, string type

 

creates dialog box. Variable title is the title of the window, msg is the message to display, type is type of window, can have only following values:

ABORTRETRYIGNORE display dialog box with three buttons [ABORT] [RETRY] [IGNORE]
OK display dialog box with button [OK]
OKCANCEL display dialog box with two buttons [OK] [CANCEL]
YESNO

display dialog box with two buttons [YES] [NO]

YESNOCANCEL display dialog box with three buttons [YES] [NO] [CANCEL]

Functions returns:

1 when user click on button OK
2 when user click on button CANCEL
3 when user click on button ABORT
4 when user click on button RETRY
5 when user click on button IGNORE
6 when user click on button YES
7 when user click on button NO
CreatePopUpMenu object me, string name create empty pop-up menu, when operation is not succesfull returns error

AppendToPopUpMenu object me, string name, string ident, string type

appends item to menu name name, parameter ident is the identifier of menu item, type is type of item, can take only following values:

DISABLED item not active
ENABLED item active
SEPARATOR separator line
CHECKED item is checked
UNCHECKED item is not checked
DisplayPopUpMenu object me, string name, string type

Display menu name on the screen. Parameter type defines aligment of menu:

CENTERALIGN align center
LEFTALIGN align left
RIGHTALIGN align right

Function returns identifier of choosed option in menu.

DestroyPopUpMenu object me, string name This function destroy menu and remove from memory.
DeletePopUpMenuItem object me, string name, string ident remove item ident from menu name

EnablePopUpMenuItem object me, string name, string ident, string type

set item ident of menu name to type type

DISABLED item not active
ENABLED item active/font>
GetPopUpMenuItem object me,string name,string ident proof item ident of menu name. when item is checked then returns "CHECKED" otherwise "UNCHECKED"

CheckPopUpMenuItem object me, string name, string ident, string type

set item ident of menu name. Parameter type can take the following values:

CHECKED item is checked
UNCHECKED item is not checked
RegisterDialogs object me, string serialNumber registering of Dialog xtra, parameter serialNumber is the serial number, you get by registering Xtra. When you do not register Dialog Xtra, program will recall registering by distributing your product

 


Back to toc

How to use Dialog Xtra
FontDialog  

set handler= new(xtra "Dialog")

set lFont = FontDialog(handler)

if( not voidP(rgb) )then put lFont

opens the font dialog window and user can choose font face, size, color, style and effect. When user did not choose any font (click on button CANCEL) functions returns VOID otherwise list:

["Font",size,color,"style","effect"]

FileOpenDialog  

set handler= new(xtra "dialog")

FileOpenDialog(handler,"", "*.bmp")

or

FileOpenDialog(handler,"ALLOWMULTISELECT", "*.bmp")

FileSaveDialog  

set handler= new(xtra "dialog")

FileSaveDialog(handler,"*.bmp")

ColorDialog  

set handler= new(xtra "Dialog")

set lRgb = ColorDialog(handler)

if( not voidP(lRgb) )then put lRgb

opens the color picker dialog window and user can choose color. When user do not choose any font (click on button CANCEL) functions returns VOID otherwise functions returns list with RGB components.

MessageBox  

 

set a= new(xtra "Dialog")

if(MessageBox(a,"Koniec?","Do You want to quit?","OKCANCEL")=1) then go to "Koniec"

 

creats dialog box with question "Do You want to quit?" when the uset click on button OK then the programs quits.

In the message you can use "/n" [enter] to breake lines.

Menu  

global handl,bError,sVar

on start
set          handl = new(xtra          "dialog")
if ( CreatePopUpMenu(handl,"Menu")="error") then bError=1
if ( CreatePopUpMenu(handl,"Pop1")="error") then bError=1
if ( CreatePopUpMenu(handl,"Pop2")="error") then bError=1

if (bError) return 0
AppendToPopUpMenu(handl,  "Pop1" , "&element  7", "ENABLED" ) 
AppendToPopUpMenu(handl,  "Pop1",  "element 8",  "CHECKED") 
AppendToPopUpMenu(handl,  "Pop1" ,  "element 9"  ,  "ENABLED") 

AppendToPopUpMenu(handl,  "Pop2" ,  "element 5" , "CHECKED")
AppendToPopUpMenu(handl,  "Pop2"  , "element 6" ,  "ENABLED")          
AppendToPopUpMenu(handl,  "Pop2" ,  "Pop1",  "ENABLED" ) 

AppendToPopUpMenu(handl,  "Menu" ,  "Pop2" ,  "ENABLED")
AppendToPopUpMenu(handl,  "Menu"  , "&element 1",  "ENABLED")         
AppendToPopUpMenu(handl,  "Menu" ,  "element 2" ,  "CHECKED") 
AppendToPopUpMenu(handl,  "Menu" ,  "element 3"  , "CHECKED") 
AppendToPopUpMenu(handl,  "Menu"  , "element 4" , "CHECKED")         
end 
on Display 
if (bError) return 0
set sVar = DisplayPopUpMenu(handl, "Menu" ,"RIGHTALIGN")         
end

on enable
if (bError) return 0
  EnablePopUpMenuItem(handl,"Menu","element 2","DISABLED")
  EnablePopUpMenuItem(handl,"Pop1","element 9","DISABLED")

  CheckPopUpMenuItem(handl,"Pop2","element 5","UNCHECKED")
  CheckPopUpMenuItem(handl,"Pop1","element 8","UNCHECKED")
end

on delete
if (bError) return 0
  DeletePopUpMenuItem(handl,"Menu","element  4",)
  DeletePopUpMenuItem(handl,"Pop1","element 7",)
end
on Exit 
if (bError) return 0
 DestroyPopUpMenu(handl, "Menu" )
 DestroyPopUpMenu(handl, "Pop2" )
 DestroyPopUpMenu(handl, "Pop1" ) 
end 

on  translate
case sVar of

"element  9-Pop1": put "you choosed element 9" 
"element  8-Pop1": put "you choosed element 8" 
"element  7-Pop1": put "you choosed element 7" 
"element  6-Pop2": put "you choosed element 6"
"element  5-Pop2": put "you choosed element 5"
"element  4-Menu": put "you choosed element 4"
"element  3-Menu": put "you choosed element 3" 
"element  2-Menu": put "you choosed element 2" 
"element  1-Menu": put "you choosed element 1" 


end case 
end

on mouseDown
start
delete
enable
Display 
Exit 
translate
end

Handler Start empty creates pop-up menu, then we fill it with items (bolded lines created cascaded menu).

Handler Display displays menu on the screen Handler enable enables items "element 2", "element 9", and uncheck items "element 5" i "element 8"

Handler delete removes item "element 4" i "element 7"

Handler Exit release memory and handler translate tracks the user interactions.

In event handler on mouse down you see the proper cue of handler to operate the pop-up menu. Handler delete and enable are optional

When item first character is ampersand & (np. "&element 1" ) then the next character is used as keybord shortcut, for example you item"&element 1" by pressing the key e.

Varable Error prevents from calling menu handlers, when creating pop-up menu was not succesfull.


Back to toc