#ifndef MUIFDEFS_H
#define MUIDEFS_H

/*
 * $Source: Jojo:Source/C/XMS/include/libraries/muidefs.h,v $
 *
 * $Revision: 1.1 $
 * $Author: Jojo $
 * $Date: 1994/04/17 11:04:00 $
 *
 * $Log: muidefs.h,v $
 * Revision 1.1  1994/04/17  11:04:00  Jojo
 * Initial revision
 *
 */



/*
 * New "gadget type": Integer
 */

#define ACCEPTSNUMBERS "0123456789-"
#define ACCEPTUNUMBERS "0123456789"

#define SInteger( contents, maxLen )\
 StringObject,\
  StringFrame,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptSNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define UInteger( contents, maxLen )\
 StringObject,\
  StringFrame,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptUNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define KeySInteger( contents, maxLen, ctrlChar )\
 StringObject,\
  StringFrame,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptSNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define KeyUInteger( contents, maxLen, ctrlChar )\
 StringObject,\
  StringFrame,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptUNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtSInteger( contents, maxLen, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptSNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtUInteger( contents, maxLen, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptUNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtKeySInteger( contents, maxLen, ctrlChar, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptSNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtKeyUInteger( contents, maxLen, ctrlChar, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, maxLen + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptUNumbers,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End


/*
 * New gadget type Note:
 */

#define ACCEPTNOTES "CDEFGABH #0123456789"

#define Note( contents )\
 StringObject,\
  StringFrame,\
  MUIA_String_MaxLen, 3 + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptNotes,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define KeyNote( contents, ctrlChar )\
 StringObject,\
  StringFrame,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, 3 + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptNotes,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtNote( contents, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_String_MaxLen, 3 + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptNotes,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End

#define WtKeyNote( contents, ctrlChar, weight )\
 StringObject,\
  StringFrame,\
  MUIA_Weight, weight,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_String_MaxLen, 3 + 1,\
  MUIA_String_Contents, contents,\
  MUIA_String_Accept, acceptNotes,\
  MUIA_String_Format, MUIV_String_Format_Right,\
 End


/*
 * New Label-Macros: ...CLabel...() (centered labels)
 */

#define CLabel( label )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
 End

#define CLabel1( label )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
  ButtonFrame,\
  MUIA_FramePhantomHoriz, TRUE,\
 End

#define CLabel2( label )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
  StringFrame,\
  MUIA_FramePhantomHoriz, TRUE,\
 End

#define KeyCLabel( label, ctrlChar )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Text_HiChar, ctrlChar,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
 End

#define KeyCLabel1( label, ctrlChar )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Text_HiChar, ctrlChar,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
  ButtonFrame,\
  MUIA_FramePhantomHoriz, TRUE,\
 End

#define KeyCLabel2( label, ctrlChar )\
 TextObject,\
  MUIA_Text_PreParse, "c",\
  MUIA_Text_Contents, label,\
  MUIA_Text_HiChar, ctrlChar,\
  MUIA_Weight, 0,\
  MUIA_InnerLeft, 0,\
  MUIA_InnerRight, 0,\
  StringFrame,\
  MUIA_FramePhantomHoriz, TRUE,\
 End


/*
 * KeyPopButton-macro:
 */

#define KeyPopButton( image, ctrlChar )\
 ImageObject,\
  ImageButtonFrame,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_Image_Spec, image,\
  MUIA_Image_FontMatchWidth, TRUE,\
  MUIA_Image_FreeVert, TRUE,\
  MUIA_InputMode, MUIV_InputMode_RelVerify,\
  MUIA_Background, MUII_BACKGROUND,\
 End

/*
 * Simple use of RectangleObjects: HBar...() & VBar...()
 */

#define HBar\
 RectangleObject,\
  MUIA_Rectangle_HBar, TRUE,\
 End

#define VBar\
 RectangleObject,\
  MUIA_Rectangle_VBar, TRUE,\
 End

#define HBarFixed( height )\
 RectangleObject,\
  MUIA_Rectangle_HBar, TRUE,\
  MUIA_FixedHeight, height,\
 End

#define VBarFixed( width )\
 RectangleObject,\
  MUIA_Rectangle_VBar, TRUE,\
  MUIA_FixedWidth, width,\
 End


/*
 * New Button-macros
 */

#define ToggleButton( name, state )\
 TextObject,\
  ButtonFrame,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_InputMode, MUIV_InputMode_Toggle,\
  MUIA_Selected, state,\
  MUIA_Background, MUII_ButtonBack,\
 End

#define KeyToggleButton( name, state, ctrlChar )\
 TextObject,\
  ButtonFrame,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_Text_HiChar, ctrlChar,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_InputMode, MUIV_InputMode_Toggle,\
  MUIA_Selected, state,\
  MUIA_Background, MUII_ButtonBack,\
 End

#define WtButton( name, weight )\
 TextObject,\
  ButtonFrame,\
  MUIA_Weight, weight,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_InputMode, MUIV_InputMode_RelVerify,\
  MUIA_Background, MUII_ButtonBack,\
 End

#define WtKeyButton( name, key, weight )\
 TextObject,\
  ButtonFrame,\
  MUIA_Weight, weight,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_Text_HiChar, key,\
  MUIA_ControlChar, key,\
  MUIA_InputMode, MUIV_InputMode_RelVerify,\
  MUIA_Background, MUII_ButtonBack,\
 End

#define WtToggleButton( name, state, weight )\
 TextObject,\
  ButtonFrame,\
  MUIA_Weight, weight,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_InputMode, MUIV_InputMode_Toggle,\
  MUIA_Selected, state,\
  MUIA_Background, MUII_ButtonBack,\
 End

#define WtKeyToggleButton( name, state, ctrlChar, weight )\
 TextObject,\
  ButtonFrame,\
  MUIA_Weight, weight,\
  MUIA_ControlChar, ctrlChar,\
  MUIA_Text_HiChar, ctrlChar,\
  MUIA_Text_Contents, name,\
  MUIA_Text_PreParse, "\33c",\
  MUIA_InputMode, MUIV_InputMode_Toggle,\
  MUIA_Selected, state,\
  MUIA_Background, MUII_ButtonBack,\
 End


#endif
