doiMenu v.1.5 DOCUMENTATION

Content
  How To
  Parameter
   

How To
Steps to build the menu:

0. include doiMenuDOM.js. I put the code below in head section
  <script type="text/javascript" src="doiMenuDOM.js"></script>
1. declare main menu like
  var mmenu = new TMainMenu(main_menu_var_name,direction)
 
parameter type info
main_menu_var_name string main menu variable name. in this example = 'mmenu'
direction string

direction of main menu.
available value : 'horizontal','vertical'.
default is 'horizontal'

 
  See demo for detail
2. declare pop up menu like
  var pmenu = new TPopMenu(label,icon,clickType,clickParam,status)
 
parameter type info
label string label
icon string icon image or the distance between label and left edge of pop up menu.
image width will be stretched to 16px.
clickType string available value:
'function','f' : onclick event will execute function in clickParam
'address','a': open url address in clickParam in same window
'' : onclick will not be generated
clickParam string onclick event function
status string status in status bar.
 
  See demo for detail
declare pop up menu as many as you need
3.

add pop menu object (variable) to main menu object or other pop menu object that you want pop menu to appear in.
example:
mmenu.Add(pmenu) = pmenu will appear in main menu item
pmenu1.Add(pmenu0) = pmenu1 will appear in pmenu0 pop menu item

4. set parameters as you need. see Parameter Setting
5.

build the menu code with Build() function.
example:
mmenu.Build()

6. See demo for detail

Parameter
I have made some functions to set the parameter up. Those functions are devided into 2 groups of function

1. Main menu function
   

sets parameters that affect on main menu appearance.
example how to call the function:
mmenu.SetPosition('absolute',100,100)

2. Pop up menu function
    sets parameters that affect on pop up menu appearance.
example how to call the function:
mmenu._pop.SetPaddings(0)
See the table below for complete list of available functions.
 
function
available for
SetBackground
Set menu background
 
parameter
type
info
  dColor string background color
  dImage string background image
  dRepeat string how the background image will be repeated.
available value:'repeat','repeat-x','repeat-y','no-repeat'
  dPos string starting position of background image.
available value:'top left', 'top center', 'top right', 'center left', 'center center', 'center right' ,'bottom left', 'bottom center', 'bottom right', 'x-% y-%', 'x-pos y-pos'
both
SetBorder
Set menu border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type.
available value:'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'
both
SetBorderTop
Set top menu border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetBorderRight
Set right menu border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetBorderBottom
Set bottom menu border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetBorderLeft
Set left menu border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetCellSpacing
Set main menu cellspacing
 
parameter
type
info
  dSpace integer cellspacing
main menu
SetCorrection
Set correction of distance between main menu and pop up menu or pop up menus in pixel
 
parameter
type
info
  dLeft integer left correction
  dTop integer top correction
both
SetDelay
Set time out of pop up menu appearance
 
parameter
type
info
  dTimeOut integer time delay in millisecond
pop up menu
SetExpandIcon
Set expand icon
 
parameter
type
info
  dCreate boolean create expand icon or not
  dSymbol string expand icon symbol.
available value: ''='&#9658;' or
  dSize integer size of expand icon in point
pop up menu
SetFont
Set font style
 
parameter
type
info
  dFamily string font family
  dSize string font size
both
SetItemBackground
Set background of menu item
 
parameter
type
info
  dColor string background color
  dImage string background image
  dRepeat string how the background image will be repeated
  dPos string starting position of background image
both
SetItemBackgroundClick
Set background of main menu item when clicked
 
parameter
type
info
  dColor string background color
  dImage string background image
  dRepeat string how the background image will be repeated
  dPos string starting position of background image
main menu
SetItemBackgroundHL
Set background of menu item when highlighted
 
parameter
type
info
  dColor string background color
  dImage string background image
  dRepeat string how the background image will be repeated
  dPos string starting position of background image
both
SetItemBorder
Set menu item border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderTop
Set top menu item border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderRight
Set right menu item border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderBottom
Set bottom menu item border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderLeft
Set left menu item border
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderClick
Set menu item border when clicked
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
main menu
SetItemBorderTopClick
Set top menu item border when clicked
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
main menu
SetItemBorderRightClick
Set right menu item border when clicked
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
main menu
SetItemBorderBottomClick
Set bottom menu item border when clicked
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
main menu
SetItemBorderLeftClick
Set left menu item border when clicked
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
main menu
SetItemBorderHL
Set menu item border when highlighted
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderTopHL
Set top menu item border when highlighted
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderRightHL
Set right menu item border when highlighted
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderBottomHL
Set bottom menu item border when highlighted
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemBorderLeftHL
Set left menu item border when highlighted
 
parameter
type
info
  dSize integer border size in pixel
  dColor string border color
  dType string border type
both
SetItemDimension
Set dimension of menu item
 
parameter
type
info
  dWidth integer width of menu item in pixel
  dHeight integer height of menu item in pixel
both
SetItemPadding
Set pop up menu item padding
 
parameter
type
info
  dTop integer top padding size in pixel
  dRight integer right padding size in pixel
  dBottom integer bottom padding size in pixel
  dLeft integer left padding size in pixel
pop up menu
SetItemPaddings
Set pop up menu item padding
 
parameter
type
info
  dSize integer padding size in pixel
pop up menu
SetItemPaddingHL
Set pop up menu item padding when highlighted
 
parameter
type
info
  dTop integer top padding size in pixel
  dRight integer right padding size in pixel
  dBottom integer bottom padding size in pixel
  dLeft integer left padding size in pixel
pop up menu
SetItemPaddingsHL
Set pop up menu item padding when highlighted
 
parameter
type
info
  dSize integer padding size in pixel
pop up menu
SetItemText
Set appearance of text label of menu item
 
parameter
type
info
  dColor string text label color
  dAlign string alignment type of text label.
available value: 'left','center','right', 'justify'
  dWeight string weight type of text label.
available value: 'normal' ,'bold' ,'bolder' ,'lighter' ,'100' ,'200' ,'300' ,'400' ,'500' ,'600' ,'700' ,'800' ,'900'
  dDecoration string decoration type of text label.
available value: 'none', 'underline', 'overline', 'line-through', 'blink'
  dWSpace string white space type of text label.
available value: 'normal', 'pre', 'nowrap'
both
SetItemTextClick
Set appearance of text label of menu item when clicked
 
parameter
type
info
  dColor string text label color
  dAlign string alignment type of text label
  dWeight string weight type of text label
  dDecoration string decoration type of text label
  dWSpace string white space type of text label
main menu
SetItemTextHL
Set appearance of text label of menu item when highlighted
 
parameter
type
info
  dColor string text label color
  dAlign string alignment type of text label
  dWeight string weight type of text label
  dDecoration string decoration type of text label
  dWSpace string white space type of text label
both
SetPadding
Set pop up menu padding
 
parameter
type
info
  dTop integer top padding size in pixel
  dRight integer right padding size in pixel
  dBottom integer bottom padding size in pixel
  dLeft integer left padding size in pixel
pop up menu
SetPaddings
Set pop up menu padding
 
parameter
type
info
  dSize integer padding size in pixel
pop up menu
SetPosition
Set position style of main menu
 
parameter
type
info
  dPosition string position style.
Available value: 'absolute','relative'
  dLeft integer left position in pixel
  dTop integer top position in pixel
main menu
SetSeparator
Set appearance of separator
 
parameter
type
info
  dWidth integer width of separator in pixel
  dAlign string alignment of separator
  dColor1 string top color of separator
  dColor2 string bottom color of separator
pop up menu
SetShadow
Set menu shadow
 
parameter
type
info
  dCreate boolean create shadow or not
  dColor string shadow color
  dDistance integer distance between menu and shadow
both
SetWidth
Set menu width
 
parameter
type
info
  dWidth integer width in pixel
main menu
See demo for detail

--"We don't work hard, we work happily"--
© 2003 Donna Iwan Setiawan