Diff of /ooDialog/branches/4.2.3/trunk/examples/propertySheet.tabControls/ticketWizard.rex [r9605] .. [r9606] Maximize Restore

  Switch to unified view

a/ooDialog/branches/4.2.3/trunk/examples/propertySheet.tabControls/ticketWizard.rex b/ooDialog/branches/4.2.3/trunk/examples/propertySheet.tabControls/ticketWizard.rex
...
...
58
 * this time, to change the font of the wizard itself.
58
 * this time, to change the font of the wizard itself.
59
 *
59
 *
60
 * This is a rather complex program.  The commenting is not 100%.  Be sure to
60
 * This is a rather complex program.  The commenting is not 100%.  Be sure to
61
 * read the ooDialog documentation on the PropertySheetDialog to fully under-
61
 * read the ooDialog documentation on the PropertySheetDialog to fully under-
62
 * stand this program.
62
 * stand this program.
63
 *
64
 * Note: this program uses the public routine, locate(), to get the full path
65
 * name to the directory this source code file is located. In places, the
66
 * variable holding this value has been callously abbreviated to 'sd' which
67
 * stands for source directory.
68
 *
63
 */
69
 */
64
70
65
  sd = locate()
71
  sd = locate()
66
  .application~useGlobalConstDir('O', sd"rc\ticketWizard.h")
72
  .application~useGlobalConstDir('O', sd"rc\ticketWizard.h")
67
73
...
...
655
  return width
661
  return width
656
662
657
::method initDialog
663
::method initDialog
658
  expose filmArray movieDays selectedMovies movieCombo
664
  expose filmArray movieDays selectedMovies movieCombo
659
665
666
  sd = locate()
660
  staticImage = self~newStatic(IDC_ST_MOVIE_BMP)
667
  staticImage = self~newStatic(IDC_ST_MOVIE_BMP)
661
  size = staticImage~getRealSize
668
  size = staticImage~getRealSize
662
  image = .Image~getImage(.application~srcDir'rc\ticketWizardMovie.bmp', .Image~toID(IMAGE_BITMAP), size)
669
  image = .Image~getImage(sd'rc\ticketWizardMovie.bmp', .Image~toID(IMAGE_BITMAP), size)
663
  staticImage~setImage(image)
670
  staticImage~setImage(image)
664
671
665
  filmArray = .array~new(20)
672
  filmArray = .array~new(20)
666
  self~propSheet~querySiblings(filmArray, "FILMS")
673
  self~propSheet~querySiblings(filmArray, "FILMS")
667
674
...
...
1010
-- CompletionDlg
1017
-- CompletionDlg
1011
--  Dialog for the sixth page (exterior page, review and finish.)
1018
--  Dialog for the sixth page (exterior page, review and finish.)
1012
::class 'CompletionDlg' subclass UserPSPDialog
1019
::class 'CompletionDlg' subclass UserPSPDialog
1013
1020
1014
::method defineDialog
1021
::method defineDialog
1022
    expose sd
1023
1024
    sd = locate()
1015
1025
1016
    -- Watermark bitmap is 164 x 316.  The wizard does not stretch the bitmap,
1026
    -- Watermark bitmap is 164 x 316.  The wizard does not stretch the bitmap,
1017
    -- its size remains constant.  So, the width of the bitmap, in dialog units,
1027
    -- its size remains constant.  So, the width of the bitmap, in dialog units,
1018
    -- changes as the font changes.  pixel2dlgUnit() will convert the pixel size
1028
    -- changes as the font changes.  pixel2dlgUnit() will convert the pixel size
1019
    -- of the bitmap to the correct dialog units for the font in use by this
1029
    -- of the bitmap to the correct dialog units for the font in use by this
...
...
1063
1073
1064
    y = self~sizeY - s~height - 4
1074
    y = self~sizeY - s~height - 4
1065
1075
1066
    if .DlgUtil~comCtl32Version < 6 then do
1076
    if .DlgUtil~comCtl32Version < 6 then do
1067
      self~createBitmapButton(IDC_PB_TICKET_BMP, x, y, s~width, s~height, "FRAME USEPAL STRETCH GROUP", "Get the Ticket", -
1077
      self~createBitmapButton(IDC_PB_TICKET_BMP, x, y, s~width, s~height, "FRAME USEPAL STRETCH GROUP", "Get the Ticket", -
1068
                              'onGetTicket', .application~srcDir"rc\ticketWizardTicket.bmp")
1078
                              'onGetTicket', sd"rc\ticketWizardTicket.bmp")
1069
   end
1079
   end
1070
   else do
1080
   else do
1071
      self~createPushButton(IDC_PB_TICKET_BMP, x, y, s~width, s~height, "GROUP", "", 'onGetTicket')
1081
      self~createPushButton(IDC_PB_TICKET_BMP, x, y, s~width, s~height, "GROUP", "", 'onGetTicket')
1072
   end
1082
   end
1073
1083
1074
   self~connectComboBoxEvent(IDC_COMBO_COMPLETE, "SELENDOK", "onComboUpdate")
1084
   self~connectComboBoxEvent(IDC_COMBO_COMPLETE, "SELENDOK", "onComboUpdate")
1075
1085
1076
::method initDialog
1086
::method initDialog
1077
  expose movieCombo staticTheater staticDay staticTime
1087
  expose movieCombo staticTheater staticDay staticTime sd
1078
1088
1079
  msg = "Thank You For Using the ooRexx Movie Ticket Selectitron Wizard"
1089
  msg = "Thank You For Using the ooRexx Movie Ticket Selectitron Wizard"
1080
    font1 = self~createFontEx("Verdana", 12, "BOLD")
1090
    font1 = self~createFontEx("Verdana", 12, "BOLD")
1081
1091
1082
    st1 = self~newStatic(IDC_ST_COMPLETE_MSG)
1092
    st1 = self~newStatic(IDC_ST_COMPLETE_MSG)
...
...
1093
   bmpButton = self~newPushButton(IDC_PB_TICKET_BMP)
1103
   bmpButton = self~newPushButton(IDC_PB_TICKET_BMP)
1094
   size = bmpButton~getRealSize
1104
   size = bmpButton~getRealSize
1095
   size~width -= 10;
1105
   size~width -= 10;
1096
   size~height -= 10;
1106
   size~height -= 10;
1097
1107
1108
   sd = locate()
1098
   image = .Image~getImage(.application~srcDir'rc\ticketWizardTicket.bmp', .Image~toID(IMAGE_BITMAP), size)
1109
   image = .Image~getImage(sd'rc\ticketWizardTicket.bmp', .Image~toID(IMAGE_BITMAP), size)
1099
   imageList = .ImageList~create(size, .Image~toID(ILC_COLOR8), 1, 0)
1110
   imageList = .ImageList~create(size, .Image~toID(ILC_COLOR8), 1, 0)
1100
   imageList~add(image)
1111
   imageList~add(image)
1101
1112
1102
   align = .Image~toID(BUTTON_IMAGELIST_ALIGN_CENTER)
1113
   align = .Image~toID(BUTTON_IMAGELIST_ALIGN_CENTER)
1103
   margin = .Rect~new(5)
1114
   margin = .Rect~new(5)
...
...
1243
1254
1244
    oldFont = .directory~new
1255
    oldFont = .directory~new
1245
    oldFont~name = .PlainBaseDialog~getFontName
1256
    oldFont~name = .PlainBaseDialog~getFontName
1246
    oldFont~size = .PlainBaseDialog~getFontSize
1257
    oldFont~size = .PlainBaseDialog~getFontSize
1247
1258
1259
    sd = locate()
1248
    dlg = .FontPicker~new(.application~srcDir"rc\ticketWizard.rc", IDD_FONT_PICKER, , , , 6)
1260
    dlg = .FontPicker~new(sd"rc\ticketWizard.rc", IDD_FONT_PICKER, , , , 6)
1249
    if dlg~initCode == 0 then do
1261
    if dlg~initCode == 0 then do
1250
        dlg~execute("SHOWTOP", IDI_DLG_OOREXX)
1262
        dlg~execute("SHOWTOP", IDI_DLG_OOREXX)
1251
    end
1263
    end
1252
1264
1253
    return oldFont
1265
    return oldFont