// Revenant - Copyright 1999 Cinematix Studios, Inc.
// ******* Screen Widgets Definition File  ******* 

// Common drawmode flags
#define DM_BACKGROUND			0x00000010	// Draws bitmap to background
#define DM_NORESTORE			0x00000020	// Disables automatic background restoring
#define DM_TRANSPARENT			0x00000100	// Enables transparent drawing.
#define DM_ALIAS 				0x00001000	// Antiailiases edges using bitmap alias data.
#define DM_ALPHA 				0x00002000	// Enables Alpha drawing.
#define DM_USEREG				0x00020000	// Draws bitmap based on registration point
#define DM_USEDEFAULT			0x80000000	// Draws bitmap based on registration point

// Text flags
#define TEXT_LEFT				0x0001		// Left justify text
#define TEXT_CENTER				0x0002		// Center justify text
#define TEXT_RIGHT				0x0004		// Right justify text
#define TEXT_FITCLIP			0x0008		// Move text lines so they fit within the clip rect
#define TEXT_TOP				0x0010		// Left justify text
#define TEXT_BOTTOM				0x0020		// Center justify text
#define TEXT_VCENTER			0x0040		// Right justify text
#define TEXT_SINGLELINE			0x0080		// Text will be printed at destx, desty, and be a single line
#define TEXT_NODRAW				0x0100		// Just calculate the size of the text drawn 
#define TEXT_NOBASELINE			0x0200		// Draws text from top of character, not upper left corner
#define TEXT_SHADOW				0x0400		// Draws shadowed text style
#define TEXT_GLOW				0x0800		// Draws glowing text style
#define TEXT_SELECT				0x1000		// Draws selected text style
#define TEXT_ELIPSES			0x2000		// If text goes beyond limits, use elipses at end

// Control flags
#define CTRLFLAG_ERROR			0x00000001	// Control failed to initialize 
#define CTRLFLAG_HIDDEN			0x00000002	// Control is hidden
#define CTRLFLAG_DISABLED		0x00000004	// Control is disabled
#define CTRLFLAG_SELECTED		0x00000008	// Control is selected
#define CTRLFLAG_SELECTABLE		0x00000010	// Control is selectable
#define CTRLFLAG_DIRTY			0x00000020	// Control is dirty (will be redrawn next frame)
#define CTRLFLAG_DRAWTOBG		0x00000800	// Control will draw itself to the control pane bg
#define CTRLFLAG_CLEARBG		0x00001000	// Forces control to clear bg if it doesn't by default (i.e. BITMAP, FRAME, TEXT)

#define BMCTRLFLAG_DRAWTOBG		0x00010000	// Draw bitmap to the background

#define TEXTFLAG_FRAME			0x00010000	// Draw a frame for this contorl
#define TEXTFLAG_CENTER			0x00040000	// Center the text (default is left)
#define TEXTFLAG_RIGHT			0x00080000	// Draw the text right justified (default is left)
#define TEXTFLAG_TOP			0x00100000	// Draw text top justified (default is vcenter)
#define TEXTFLAG_BOTTOM			0x00200000  // Draw text bottom justified (default is vcenter)
#define TEXTFLAG_FIELDCLR		0x00400000  // Use field color when drawing text

#define BTNFLAG_DOWN			0x00010000	// This button is down
#define BTNFLAG_NOTSQUARE		0x00020000	// This button uses the keycolor of the up bitmap for hit testing
#define BTNFLAG_TOGGLE			0x00040000	// This button behaves like a toggle button
#define BTNFLAG_RADIO			0x00080000	// This button behaves like a radio button
#define BTNFLAG_NODRAW			0x00100000	// Don't draw the button (pane will draw it)
#define BTNFLAG_DRAWRADIO		0x00200000	// Draw button with radio style
#define BTNFLAG_DRAWTOGGLE		0x00400000	// Draw button with toggle style

#define SCROLLFLAG_VSCROLL		0x00010000	// This is a vertical scroll bar
#define SCROLLFLAG_HSCROLL		0x00020000	// This is a horizontal scroll bar

#define LISTFLAG_VLIST			0x00010000	// This is a vertical list box
#define LISTFLAG_HLIST			0x00020000	// This is a horizontal list box
#define LISTFLAG_NOSCROLL		0x00040000	// This list box has no scroll bar
#define LISTFLAG_USEFORMAT		0x00080000	// This list box has a scroll bar
#define LISTFLAG_DBLCLICK		0x00100000	// This list box allows you to doubleclick
#define LISTFLAG_VIEWONLY		0x00200000	// List is viewable only, no currently selected item

#define EDITFLAG_NOFRAME		0x00010000	// This is a vertical list box
#define EDITFLAG_NOEDIT			0x00020000	// This is a horizontal list box
#define EDITFLAG_SPIN			0x00040000	// This field has spin buttons
#define EDITFLAG_FIELDCLR		0x00080000	// Use field color for edit control
#define EDITFLAG_NUMERIC		0x00100000	// This field is a numeric field
#define EDITFLAG_CENTER			0x00200000	// Center text in control
#define EDITFLAG_RIGHT          0x00400000	// Right justify text in control
#define EDITFLAG_MULTILINE		0x00800000  // Enter doesn't end editing control.. adds newline instead
#define EDITFLAG_ENTERMSG		0x01000000  // Sends an EDITMSG_ENTERPRESSED instead of ending editing

#define DROPFLAG_NOSCROLL		0x00010000	// Don't use scroll bar in drop list
#define DROPFLAG_DRAWSEL		0x00020000	// Draw current item selected
#define DROPFLAG_USEFORMAT		0x00040000	// Draw current item selected
#define DROPFLAG_LISTUP			0x00080000	// Draw list above control

STYLE FRAME BITMAP "ClearFrame1"\
  FRAME 14 14 16 16 MARGINS 0 0 4 4 NOCENTER

STYLE TEXT BGBITMAP "ClearFrame3"\
  FRAME 5 5 5 5 MARGINS 0 0 4 4 NOCENTER\
  FONT "Med" RECT 3 0 3 0 COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_VCENTER | TEXT_SHADOW DRAWMODE DM_USEDEFAULT

STYLE BUTTON\
  NORMAL UP "ClearFrame2" DOWN "FillFrame2"\ 
	       FRAME 10 10 12 12 MARGINS 0 0 4 4\
		   UPLABEL "Med" COLOR 255 255 255 FLAGS TEXT_CENTER | TEXT_VCENTER | TEXT_SINGLELINE | TEXT_SHADOW\
		   DOWNLABEL "Med" COLOR 0 0 0 FLAGS TEXT_CENTER | TEXT_VCENTER | TEXT_SINGLELINE\
		   UPLABELRECT 0 0 0 0 DOWNLABELRECT 0 0 0 0

STYLE BUTTON\
  TOGGLE UP "CheckU" DOWN "CheckD"\ 
		   UPLABEL "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_SHADOW\
		   DOWNLABEL "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_SHADOW\
		   UPLABELRECT 18 -1 0 0 DOWNLABELRECT 18 -1 0 0

STYLE BUTTON\
  RADIO UP "RadioU" DOWN "RadioD"\ 
		   UPLABEL "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_SHADOW | TEXT_ELIPSES\
		   DOWNLABEL "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_SHADOW | TEXT_ELIPSES\
		   UPLABELRECT 18 -1 0 0 DOWNLABELRECT 18 -1 0 0

STYLE SCROLLBAR\
    VSCROLL BGBITMAP "VScrollBar" FRAME 6 22 6 22 MARGINS 0 0 4 4\
	UP "VScrollUp" 1 1\
	DOWN "VScrollDown" 1 RELB 12\
	THUMB "VScrollThumb" 19 30 2

STYLE SCROLLBAR\
    HSCROLL BGBITMAP "HScrollBar" FRAME 22 6 22 6 MARGINS 0 0 4 4\
	UP "HScrollUp" 1 1\
	DOWN "HScrollDown" RELR 12 1\
	THUMB "HScrollThumb" 19 30 2

STYLE LISTBOX\
    VLIST BGBITMAP "VScrollRect" FRAME 8 26 26 26 MARGINS 0 0 4 4 NOCENTER\
	RECT 5 5 23 5 ITEM 1000 16 SELCOLOR 0 112 74\
	FONT "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_VCENTER | TEXT_SHADOW | TEXT_SINGLELINE DRAWMODE DM_USEDEFAULT\
	SCROLLBAR RELRB 21 4 5 4 UP "VScrollUp" 1 1\
		DOWN "VScrollDown" 1 RELB 12\
		THUMB "VScrollThumb" 19 30 2

STYLE EDIT\
    NORM BGBITMAP "ClearFrame4" FRAME 5 5 5 5  MARGINS 0 0 4 4 NOCENTER\
	FONT "Med" RECT 4 2 6 2 COLOR 255 255 255 EDITCOLOR 255 255 0 FLAGS TEXT_LEFT | TEXT_SHADOW DRAWMODE DM_USEDEFAULT

STYLE EDIT\
    SPIN BGBITMAP "ClearFrame4" RECT 0 0 22 0 FRAME 5 5 5 5  MARGINS 0 0 4 4 NOCENTER\
	FONT "Med" RECT 4 0 6 2 COLOR 255 255 255 EDITCOLOR 255 255 0 FLAGS TEXT_LEFT | TEXT_SHADOW | TEXT_VCENTER DRAWMODE DM_USEDEFAULT\
	SPIN UP "SpinUp" RELR 19 0 DOWN "SpinDown" RELR 19 10

STYLE DROPLIST\
    VSCROLL BGBITMAP "ClearFrame4" RECT 0 0 23 0 FRAME 5 5 5 5 MARGINS 0 0 4 4 NOCENTER\
	ITEMRECT 2 3 2 3 DROPBUTTON "DropBtn" RELR 19 1 LISTHEIGHT 100\
	LISTBOX 0 0 5 5\
	    BGBITMAP "DropRect" FRAME 8 26 26 26 MARGINS 0 0 4 4 NOCENTER\
		RECT 5 5 23 5 ITEM 1000 16 SELCOLOR 0 112 74\
		FONT "Med" COLOR 255 255 255 FLAGS TEXT_LEFT | TEXT_VCENTER | TEXT_SHADOW | TEXT_SINGLELINE DRAWMODE DM_USEDEFAULT\
		SCROLLBAR RELRB 21 4 5 4 UP "VScrollUp" 1 1\
		DOWN "VScrollDown" 1 RELB 12\
		THUMB "VScrollThumb" 18 29 2
