#include <windows.h>
#include "julia.rh"

MenuMain MENU  DISCARDABLE
BEGIN
  POPUP "&File"
  BEGIN
    MENUITEM "Execute",           IDM_EXECUTE
    MENUITEM "Print",             IDM_PRINT
    MENUITEM "Save image",        IDM_SAVE_IMAGE
    MENUITEM "Exit",              IDM_EXIT
  END
  POPUP "&Parameters"
  BEGIN
    MENUITEM "Set parameters",    IDM_PARAMS
    MENUITEM "Color map",         IDM_COLORMAP
    MENUITEM "Magnify",           IDM_MAGNIFY
  END
  POPUP "Help"
  BEGIN
    MENUITEM "About",             IDM_ABOUT
  END
END

/*
   Dialogs
*/

DialogBoxAbout DIALOG 50, 50, 110, 83
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About Julia"
FONT 8, "MS Sans Serif"
{
 CONTROL "OK", IDOK, "BUTTON", BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 29, 60, 50, 14
 CONTROL "Julia 1.0", -1, "static", SS_CENTER | WS_CHILD | WS_VISIBLE, 27, 13, 52, 7, 0
 CONTROL "Copyright 2020 Timothy Masters", -1, "static", SS_CENTER | WS_CHILD | WS_VISIBLE, 7, 32, 96, 8, 0
}

DialogBoxProgress DIALOGEX 51, 120, 166, 40
STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Please wait..."
FONT 10, "MS Sans Serif"
{
 CONTROL "Message text here", IDC_PROGRESS_MSG, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 4,5,159,12, 0
 CONTROL "Progress",IDC_PROGRESS_BAR,"msctls_progress32", WS_BORDER,1,22,163,14
}

DialogBoxParams DIALOGEX 50, 50, 441, 257
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME
CAPTION "Parameters"
FONT 8, "MS Sans Serif"
BEGIN
    PUSHBUTTON      "OK",IDOK,382,9,50,14,BS_CENTER
    PUSHBUTTON      "Cancel",IDCANCEL,382,31,50,14,BS_CENTER
    GROUPBOX        "Image resolution",-1,92,7,73,54
    LTEXT           "Rows",-1,96,23,22,8
    EDITTEXT        IDC_ROWS,120,21,35,14,ES_AUTOHSCROLL
    LTEXT           "Cols",-1,96,43,19,8
    EDITTEXT        IDC_COLS,120,41,35,14,ES_AUTOHSCROLL
    GROUPBOX        "Type",-1,7,5,74,102
    CONTROL         "Mand - dwell",IDC_TYPE_MANDEL_DWELL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,18,15,59,10
    CONTROL         "Mand - binary",IDC_TYPE_MANDEL_BINARY,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,18,30,59,10
    CONTROL         "Julia - dwell",IDC_TYPE_JULIA_DWELL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,18,45,50,10
    CONTROL         "Julia - binary",IDC_TYPE_JULIA_BINARY,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,18,60,60,10
    CONTROL         "M Quaternion",IDC_TYPE_M_QUATERNION,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,18,75,61,10
    CONTROL         "J Quaternion",IDC_TYPE_J_QUATERNION,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,18,90,61,10
    CONTROL         "Smooth quaternion",IDC_QUAT_SMOOTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,345,91,76,10
    RTEXT           "Binary resolution",-1,86,75,61,8
    EDITTEXT        IDC_BINARY_THRESHOLD,151,75,30,14,ES_AUTOHSCROLL
    GROUPBOX        "Julia constant",-1,178,11,102,54
    LTEXT           "Real:",-1,186,26,18,8
    EDITTEXT        IDC_JULIA_REAL,224,24,46,14,ES_AUTOHSCROLL
    LTEXT           "Imaginary:",-1,186,48,33,8
    EDITTEXT        IDC_JULIA_IMAG,224,46,46,14,ES_AUTOHSCROLL
    GROUPBOX        "Convergence",-1,286,11,92,54
    LTEXT           "Dwell limit:",-1,294,26,34,8
    EDITTEXT        IDC_DWELL_LIMIT,332,24,36,14,ES_AUTOHSCROLL
    LTEXT           "Escape:",-1,295,48,27,8
    EDITTEXT        IDC_ESCAPE_CONSTANT,332,45,36,14,ES_AUTOHSCROLL
    GROUPBOX        "",-1,19,119,75,33
    GROUPBOX        "Size and location",-1,7,111,235,133
    CONTROL         "Locate by center",IDC_LOCATE_CENTER,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,23,125,69,10
    CONTROL         "Locate by limits",IDC_LOCATE_LIMITS,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,23,138,64,10
    LTEXT           "Center  Real:",-1,13,163,42,8
    EDITTEXT        IDC_CENTER_REAL,63,160,60,14,ES_AUTOHSCROLL
    LTEXT           "Imaginary:",-1,133,163,33,8
    EDITTEXT        IDC_CENTER_IMAG,173,160,60,14,ES_AUTOHSCROLL
    LTEXT           "Magnif  Real:",-1,13,184,43,8
    EDITTEXT        IDC_MAGNIF_REAL,63,181,60,14,ES_AUTOHSCROLL
    LTEXT           "Imaginary:",-1,133,184,33,8
    EDITTEXT        IDC_MAGNIF_IMAG,173,181,60,14,ES_AUTOHSCROLL
    LTEXT           "Min  Real:",-1,13,204,33,8
    EDITTEXT        IDC_MIN_REAL,63,201,60,14,ES_AUTOHSCROLL
    LTEXT           "Imaginary:",-1,133,204,33,8
    EDITTEXT        IDC_MIN_IMAG,173,201,60,14,ES_AUTOHSCROLL
    LTEXT           "Max  Real:",-1,13,225,35,8
    EDITTEXT        IDC_MAX_REAL,63,222,60,14,ES_AUTOHSCROLL
    LTEXT           "Imaginary:",-1,133,225,33,8
    EDITTEXT        IDC_MAX_IMAG,173,222,60,14,ES_AUTOHSCROLL
    CONTROL         "Display as true aspect ratio",IDC_TRUE_ASPECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,131,132,101,10
    GROUPBOX        "Quaternion slice",-1,266,111,62,66
    CONTROL         "Real",IDC_COLLAPSE_R,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,271,122,31,10
    CONTROL         "I",IDC_COLLAPSE_I,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,271,135,18,10
    CONTROL         "J",IDC_COLLAPSE_J,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,271,149,19,10
    CONTROL         "K",IDC_COLLAPSE_K,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,271,162,21,10
    GROUPBOX        "Quaternion view angle",-1,247,189,82,54
    LTEXT           "Azimuth:",-1,251,205,28,8
    EDITTEXT        IDC_AZIMUTH,289,203,31,14,ES_AUTOHSCROLL
    LTEXT           "Elevation:",-1,251,225,32,8
    EDITTEXT        IDC_ELEVATION,289,223,31,14,ES_AUTOHSCROLL
    CONTROL         "Binary decomposition",IDC_BINARY_DECOMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,196,75,83,10
    GROUPBOX        "Quaternion lighting",-1,339,111,88,89
    CONTROL         "Distance; no light",IDC_LIGHT_0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,347,124,76,10
    CONTROL         "White at eye",IDC_LIGHT_1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,347,138,76,10
    CONTROL         "RBG around eye",IDC_LIGHT_2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,347,152,76,10
    CONTROL         "White above object",IDC_LIGHT_3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,347,166,76,10
    CONTROL         "RGB above object",IDC_LIGHT_4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,347,180,76,10
END

DialogBoxColorMap DIALOG DISCARDABLE  0, 0, 212, 106
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Color map"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,145,6,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,145,23,50,14
    LTEXT           "Starting color (0-360):",-1,5,7,68,8
    EDITTEXT        IDC_COLORMAP_START,86,6,40,14,ES_AUTOHSCROLL
    LTEXT           "Number of colors:",-1,5,25,56,8
    EDITTEXT        IDC_COLORMAP_NCOLORS,86,24,40,14,ES_AUTOHSCROLL
    LTEXT           "Brightness floor (0-100):",-1,5,44,75,8
    EDITTEXT        IDC_COLORMAP_FLOOR,86,43,40,14,ES_AUTOHSCROLL
    LTEXT           "N dwells linear",-1,5,63,53,8
    EDITTEXT        IDC_COLORMAP_NLINEAR,86,62,40,14,ES_AUTOHSCROLL
    LTEXT           "N dwells log",-1,6,83,53,8
    EDITTEXT        IDC_COLORMAP_NLOG,87,82,40,14,ES_AUTOHSCROLL
END

DialogBoxMagnify DIALOG DISCARDABLE  0, 0, 337, 154
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Magnify"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,273,9,50,14
    DEFPUSHBUTTON   "Cancel",IDCANCEL,273,29,50,14
    LTEXT           "Real",-1,90,5,16,8
    LTEXT           "Imaginary",-1,190,5,31,8
    LTEXT           "Lower limit:",-1,7,26,36,8
    CTEXT           "xxxxxx",IDC_MAGNIFY_REAL_LOWER,56,23,88,14
    CTEXT           "xxxxxx",IDC_MAGNIFY_IMAG_LOWER,162,23,88,14
    LTEXT           "Upper limit:",-1,7,53,36,8
    CTEXT           "xxxxxx",IDC_MAGNIFY_REAL_UPPER,56,50,88,14
    CTEXT           "xxxxxx",IDC_MAGNIFY_IMAG_UPPER,162,50,88,14
    LTEXT           "Center:",-1,7,80,24,8
    CTEXT           "xxxxxx",IDC_MAGNIFY_REAL_CENTER,56,77,88,14
    CTEXT           "xxxxxx",IDC_MAGNIFY_IMAG_CENTER,162,77,88,14
    LTEXT           "Magification:",-1,7,107,41,8
    CTEXT           "xxxxxx",IDC_MAGNIFY_REAL_MAGNIF,56,108,88,14
    CTEXT           "xxxxxx",IDC_MAGNIFY_IMAG_MAGNIF,162,108,88,14
    LTEXT           "Dwell at center:",-1,7,134,50,8
    CTEXT           "xxxxxx",IDC_MAGNIFY_DWELL,67,134,63,8
END


DialogBoxPrintParams DIALOG DISCARDABLE  0, 0, 183, 41
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Print"
FONT 14, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,135,4,36,14
    PUSHBUTTON      "Cancel",IDCANCEL,135,21,36,14
    RTEXT           "Percent of page width:",-1,0,6,73,8
    EDITTEXT        IDC_PRINT_FRACTION,81,4,34,12,ES_AUTOHSCROLL
    RTEXT           "Vertical scaling percent:",-1,4,21,75,8
    EDITTEXT        IDC_PRINT_VERTICAL_SCALING,81,20,35,12,ES_AUTOHSCROLL
END
/*
   Icons
*/

IDI_JULIA ICON "JULIA.ICO"
