//+------------------------------------------------------------------+
//|                                                      Defines.mqh |
//|                   Copyright 2009-2015, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Enumerations                                                     |
//+------------------------------------------------------------------+
//--- properties flags
enum ENUM_WND_PROP_FLAGS
  {
   WND_PROP_FLAG_CAN_DBL_CLICK  = 1,                              // can be double clicked by mouse
   WND_PROP_FLAG_CAN_DRAG       = 2,                              // can be dragged by mouse
   WND_PROP_FLAG_CLICKS_BY_PRESS= 4,                              // generates the "click" event series on pressing left mouse button
   WND_PROP_FLAG_CAN_LOCK       = 8,                              // control with fixed state (usually it is a button)
   WND_PROP_FLAG_READ_ONLY      =16                               // read only (usually it is a edit)
  };
//--- state flags
enum ENUM_WND_STATE_FLAGS
  {
   WND_STATE_FLAG_ENABLE        = 1,                              // "object is enabled" flag
   WND_STATE_FLAG_VISIBLE       = 2,                              // "object is visible" flag
   WND_STATE_FLAG_ACTIVE        = 4,                              // "object is active" flag
  };
//--- mouse flags
enum ENUM_MOUSE_FLAGS
  {
   MOUSE_INVALID_FLAGS          =-1,                              // no buttons state
   MOUSE_EMPTY                  = 0,                              // buttons are not pressed
   MOUSE_LEFT                   = 1,                              // left button pressed
   MOUSE_RIGHT                  = 2                               // right button pressed
  };
//--- alignment flags
enum ENUM_WND_ALIGN_FLAGS
  {
   WND_ALIGN_NONE               = 0,                               // no alignment
   WND_ALIGN_LEFT               = 1,                               // align by left border
   WND_ALIGN_TOP                = 2,                               // align by top border
   WND_ALIGN_RIGHT              = 4,                               // align by right border
   WND_ALIGN_BOTTOM             = 8,                               // align by bottom border
   WND_ALIGN_WIDTH              = WND_ALIGN_LEFT|WND_ALIGN_RIGHT,  // justify
   WND_ALIGN_HEIGHT             = WND_ALIGN_TOP|WND_ALIGN_BOTTOM,  // align by top and bottom border
   WND_ALIGN_CLIENT             = WND_ALIGN_WIDTH|WND_ALIGN_HEIGHT // align by all sides
  };
//+------------------------------------------------------------------+
//| Drawing styles and colors                                        |
//+------------------------------------------------------------------+
//--- common
#define CONTROLS_FONT_NAME                  "Trebuchet MS"
#define CONTROLS_FONT_SIZE                  (10)
//--- Text
#define CONTROLS_COLOR_TEXT                 C'0x3B,0x29,0x28'
#define CONTROLS_COLOR_TEXT_SEL             White
#define CONTROLS_COLOR_BG                   White
#define CONTROLS_COLOR_BG_SEL               C'0x33,0x99,0xFF'
//--- Button
#define CONTROLS_BUTTON_COLOR               C'0x3B,0x29,0x28'
#define CONTROLS_BUTTON_COLOR_BG            C'0xDD,0xE2,0xEB'
#define CONTROLS_BUTTON_COLOR_BORDER        C'0xB2,0xC3,0xCF'
//--- Label
#define CONTROLS_LABEL_COLOR                C'0x3B,0x29,0x28'
//--- Edit
#define CONTROLS_EDIT_COLOR                 C'0x3B,0x29,0x28'
#define CONTROLS_EDIT_COLOR_BG              White
#define CONTROLS_EDIT_COLOR_BORDER          C'0xB2,0xC3,0xCF'
//--- Scrolls
#define CONTROLS_SCROLL_COLOR_BG            C'0xEC,0xEC,0xEC'
#define CONTROLS_SCROLL_COLOR_BORDER        C'0xD3,0xD3,0xD3'
//--- Client
#define CONTROLS_CLIENT_COLOR_BG            C'0xDE,0xDE,0xDE'
#define CONTROLS_CLIENT_COLOR_BORDER        C'0x2C,0x2C,0x2C'
//--- ListView
#define CONTROLS_LISTITEM_COLOR_TEXT        C'0x3B,0x29,0x28'
#define CONTROLS_LISTITEM_COLOR_TEXT_SEL    White
#define CONTROLS_LISTITEM_COLOR_BG          White
#define CONTROLS_LISTITEM_COLOR_BG_SEL      C'0x33,0x99,0xFF'
#define CONTROLS_LIST_COLOR_BG              White
#define CONTROLS_LIST_COLOR_BORDER          C'0xB2,0xC3,0xCF'
//--- CheckGroup
#define CONTROLS_CHECKGROUP_COLOR_BG        C'0xF7,0xF7,0xF7'
#define CONTROLS_CHECKGROUP_COLOR_BORDER    C'0xB2,0xC3,0xCF'
//--- RadioGroup
#define CONTROLS_RADIOGROUP_COLOR_BG        C'0xF7,0xF7,0xF7'
#define CONTROLS_RADIOGROUP_COLOR_BORDER    C'0xB2,0xC3,0xCF'
//--- Dialog
#define CONTROLS_DIALOG_COLOR_BORDER_LIGHT  White
#define CONTROLS_DIALOG_COLOR_BORDER_DARK   C'0xB6,0xB6,0xB6'
#define CONTROLS_DIALOG_COLOR_BG            C'0xF0,0xF0,0xF0'
#define CONTROLS_DIALOG_COLOR_CAPTION_TEXT  C'0x28,0x29,0x3B'
#define CONTROLS_DIALOG_COLOR_CLIENT_BG     C'0xF7,0xF7,0xF7'
#define CONTROLS_DIALOG_COLOR_CLIENT_BORDER C'0xC8,0xC8,0xC8'
//+------------------------------------------------------------------+
//| Constants for the controls                                       |
//+------------------------------------------------------------------+
//--- common
#define CONTROLS_INVALID_ID                 (-1)     // invalid ID
#define CONTROLS_INVALID_INDEX              (-1)     // invalid index of array
#define CONTROLS_MAXIMUM_ID                 (10000)  // maximum number of IDs in application
#define CONTROLS_BORDER_WIDTH               (1)      // border width
#define CONTROLS_SUBWINDOW_GAP              (3)      //      Y
#define CONTROLS_DRAG_SPACING               (50)     //  