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

Switch to unified view

a/ooDialog/branches/4.2.3/trunk/examples/oograph.rex b/ooDialog/branches/4.2.3/trunk/examples/oograph.rex
...
...
44
 *              examples.  One example displays bitmaps and the other example
44
 *              examples.  One example displays bitmaps and the other example
45
 *              shows how to use the drawing methods provided by ooDialog.
45
 *              shows how to use the drawing methods provided by ooDialog.
46
 *
46
 *
47
 *              The main program, this program, shows how to use the
47
 *              The main program, this program, shows how to use the
48
 *              scrollBitmapFromTo() and scrollInControl() methods.
48
 *              scrollBitmapFromTo() and scrollInControl() methods.
49
 *
50
 * Note: this program uses the public routine, locate(), to get the full path
51
 * name to the directory this source code file is located. In places, the
52
 * variable holding this value has been callously abbreviated to 'sd' which
53
 * stands for source directory.
54
 *
49
 */
55
 */
50
56
51
  -- Use the global .constDir for symbolic IDs
57
  -- Use the global .constDir for symbolic IDs
52
  .application~useGlobalConstDir('O')
58
  .application~useGlobalConstDir('O')
53
59
...
...
56
  .constDir[IDC_ST_WFRAME]    = 203
62
  .constDir[IDC_ST_WFRAME]    = 203
57
  .constDir[IDC_PB_OWNERDRAW] = 103
63
  .constDir[IDC_PB_OWNERDRAW] = 103
58
  .constDir[IDC_PB_VIEWER]    = 111
64
  .constDir[IDC_PB_VIEWER]    = 111
59
  .constDir[IDC_PB_DRAW]      = 112
65
  .constDir[IDC_PB_DRAW]      = 112
60
66
61
   j = locate()
62
63
   d = .GraphDialog~new()
67
   d = .GraphDialog~new()
64
   if d~initCode \= 0 then do
68
   if d~initCode \= 0 then do
65
      say "Dialog init did not work"
69
      say "Dialog init did not work"
66
      mgr~goBack
67
      return d~initCode
70
      return d~initCode
68
   end
71
   end
69
72
70
   title = "Graphical Demonstration of Open Object Rexx and ooDialog Capabilities"
73
   title = "Graphical Demonstration of Open Object Rexx and ooDialog Capabilities"
71
   d~createCenter(trunc(770 / d~FactorX), trunc(470 / d~FactorY), title)
74
   d~createCenter(trunc(770 / d~FactorX), trunc(470 / d~FactorY), title)
...
...
100
   -- the appearance of scrolling from the bottom to the top.
103
   -- the appearance of scrolling from the bottom to the top.
101
104
102
   -- install.bmp   550 x 100 pixels
105
   -- install.bmp   550 x 100 pixels
103
   -- install2.bmp  450 x 120 pixels
106
   -- install2.bmp  450 x 120 pixels
104
107
105
   sd = .application~srcDir
108
   sd = locate()
106
109
107
   self~createBitmapButton(IDC_BMP_TOP, 1, 10, self~sizeX-1, trunc(130 / self~factorY), "USEPAL", , , sd"bmp\install.bmp")
110
   self~createBitmapButton(IDC_BMP_TOP, 1, 10, self~sizeX-1, trunc(130 / self~factorY), "USEPAL", , , sd"bmp\install.bmp")
108
   self~createBitmapButton(IDC_BMP_MIDDLE, 20, but2pos, self~sizeX - 20, but2size, , , , sd"bmp\install2.bmp")
111
   self~createBitmapButton(IDC_BMP_MIDDLE, 20, but2pos, self~sizeX - 20, but2size, , , , sd"bmp\install2.bmp")
109
112
110
   pos = .Point~new(trunc(self~sizeX * self~factorX) + 10, 0)
113
   pos = .Point~new(trunc(self~sizeX * self~factorX) + 10, 0)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks