-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow1.VRX
More file actions
3213 lines (2538 loc) · 92.3 KB
/
Window1.VRX
File metadata and controls
3213 lines (2538 loc) · 92.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*:VRX Main
*/
/*
* Colors 4 HTML (gismo)
*
* - history -
* Version 0.10 (08.Jan.97)
* > 基本的な機能を搭載。
* Version 0.11 (09.Jan.97)
* > `AlwaysCopy' functionの追加。
* > 設定をInitial Fileに記録する機能の追加。
* > その他、作り込み... ほぼ第一弾は完成。
* Version 0.12 (10.Jan.97)
* > `Always copy'をcheckしても機能しないバグを修正。
* Version 0.13 (11.Jan.97)
* > Initial fileの`AlwaysCopy'と`ColorMode'をenable
* Version 1.00 (13.Jan.97)
* > Tune up
* > 公開バージョン。
* Version 1.01 (14.Jan.97)
* > ColorListの表示がスムーズになるように修正。
* Version 1.10 (02.Mar.97) since 04.Feb.97
* > 文字の前景・背景で色の組み合わせを判断できるように仕様変更。
* > その他、細かい修正・変更。
* Version 1.20 (13.Jun.97) 1.19 beta since 28.Apr.97
* > Tag Template機能の追加。
* > WindowのFontを変更できるように仕様変更。
* > 前回使用した設定を保存するように仕様変更(Fore/Back Radio Button, 前景・背景の色)。
* Version 1.50 (22.Feb.98) 1.49 beta since 16.Aug.97
* > Hue Sort Functionの実装の準備(start from 16.Aug.97)。
* > Exit時の色の設定を記憶しない不具合を修正(16.Aug.97)。
* > Hue/Name Sort Functionの実装(20.Feb.98) since 13.Sep.97。
* - Hue/Name sortの実装 (beta 2, 13.Sep.07)
* - Saturation/Value sortの実装(beta 3, 04.Oct.97)
*
* Special thanks for Hue/Name Sort routine idea and code...
* robo@muenchen.org (Robert Boeck)
*
* > Install Programを追加。
* Version 1.51 (01.Mar.98) since 25.Feb.98
* > 英語環境でSliederが奇麗に表示できるように修正(24.Feb.98 Version 1.50.a)。
* > System Proportional Fontで奇麗に表示できるように画面デザインを変更(25.Feb.98 Version 1.50.c)。
* > FONTを変更するSub Windowを作成(25.Feb.98 Version 1.50.c)。
* > Ribbon Sliderの色をFixed Color, Dynamic Colorで選択できるように機能追加(01.Mar.98 Version 1.51 beta 1)
* Version 2.00 (04.Apr.98) since 08.Mar.98
* > Color Grid Table機能の追加(08.Mar.98 Version 1.59 beta 1)
* Special thanks to Hue/Name Sort routine idea...
* robo@muenchen.org (Robert Boeck)
* > Color Grid Table機能作り込み(10.Mar.98 Version 1.59 beta 2,3,4)
* > ColorNumber Text Areaで値の変更ができるように仕様変更(10.Mar.98 Version 1.59 beta 3)
* > Sharewareに変更(22.Mar.98 Version 1.59 beta 6)
* > Tag Templateの機能強化(25.Mar.98 Version 1.59 beta 7)
* %c : 選択された色のName/Number
* %f : foregroundで選択された色のName/Number
* %b : backgroundで選択された色のName/Number
* Version 2.05 (19.Apr.98)
* > Unregistered Versionで起動時にSortが正しくされない不具合を修正(19.Apr.98 Version 2.05)
* > `G' Buttonのフォントが変更されない不具合を修正(19.Apr.98 Version 2.05)
* > Color Numberの表示をDecimal(10進数)でも表示できるように仕様変更(19.Apr.98 Version 2.05)
* Version 2.10 (08.Aug.98) since 19.Apr.98
* > Tag Templateを移動可能(Movable)に出来るように仕様変更(19.Apr.98 2.06 beta 1)
* > Hex/Dec Changeover Buttonの追加(19.Apr.98 Version 2.06 beta 1)
* > Minimized Buttonの表示(23.Apr.98 Version 2.06 beta 2)
* > Netscape 216 Color(6x6x6)に対応(01.May.98 Version 2.06 beta 3)
* > Color Grid TableがEnable時にExitしてもPositionをSaveしない不具合を修正(01.May.98 Version 2.06 beta 3)
* > Color Grid TableのサイズをColor Modeに対応して変更するように仕様変更(01.May.98 Version 2.06 beta 4)
* > Color Grid TableがDisable時にColor Modeを変更するとErrorが起こる問題を修正(02.May.98 Version 2.06 beta 5)
* > TagTemplateWindowのData表示部をDescriptiveTextからEntryFieldに変更(02.May.98 Version 2.06 beta 5)
* > Regitry WindowのPositionの調整(02.May.98 Version 2.06 beta 5)
* > 216 Color Mode時のCustom Color Grid Table機能の強化(24.May.98 Version 2.06 beta 6)
* > 各色の値をSpin Buttonで調整ができるように仕様変更(24.May.98 Version 2.06 beta 6)
* > Color Spin Buttonを押しても最初のClickに反応しない不具合を修正(01.Aug.98, 2.06 beta 7) <- まだ直っていない???
* > Color Spin Buttonの設定値の不具合を修正(07.Aug.98, 2.06 beta 8)
* > Preference Windowsのfontが一部反映されない不具合を修正(08.Aug.98 2.06 beta 8)
* > 2.06 beta 8を2.10として公開(08.Aug.98)
* Version 2.11 (01.Oct.98) since 09.Sep.98
* > Color Numberの最大値以上の数字が初期設定値にある場合の不具合を修正(09.Sep.98 2.11 beta 1)
* > 下記Errorへの対処(13.Sep.98 2.11. beta 2)
*
* Line 29 of DDCB_BasisColorList_Change in Window1.VRM:
* +++ ok = VRSet('SPIN_RedValue', 'Value',
* x2d(left(selected_color_number, 2)));
*
* > その他、不具合の修正等(Through all beta version)
* > 216 Color Palette Mode時にName/RGBの選択が無効になるのでRadio ButtonをDisableにするように仕様変更(29.Sep.98 2.11 beta 3)
* Version 2.12 (26.Sep.98) since 27.Oct.98
* > Tuning (Ver.2.12 beta 1 27.Oct.98)
* > Registryされた場合のAbout画面の見え方を変更 (2.12 beta 2, 08.Sep.1999)
* > DEMO版用機能追加とそれに伴う仕様変更 (2.12 beta 2, 08.Sep.1999)
* > Version 2.12公開 (26.Sep.1999)
* Version 2.13 (11.Dec.1999) since 28.Sep.1999
* > Window Fontを最初の起動時に設定するように仕様変更 (2.13 beta 1, 28.Sep.1999)
* > Registration WindowのFontにwindow_fontを使用するように仕様変更 (2.13 beta 1, 28.Sep.1999)
* > Version 2.13公開 (11.Dec.1999)
* Version 2.14 (04.Jan.2000)
* > 一部GUIのMinor Update (Ribbon Margin)。
* > window_fontが正しくセットされない不具合の修正。
* > About Windowを表示しないように仕様変更。代わりにRegistration Windowを表示。
* Version 2.15 ( . . ) since 24.Sep.2000
* > Hex/Dec切替え後にColor Grid Tableの表示をするとサイズが`216 Color Palette'のサイズになる問題を修正 (2.15 beta 1, 24.Sep.2000)
* > Tag Template使用時に`G' Buttonを押すと`#'がRGB値の前に余分に追加されてしまう不具合を修正 (2.19 beta 1, 01.May.2001)
* > Color Grid Tableに表示されている配色でColor PaletteをDesktopに作成する機能の追加 (2.19 beta 1, 01.May.2001)
* Special thanks for this function - Idea and Source code,
*
* Lutz Pescht <Lutz@periplaneta.de>
*
* > Gismo Color Palette作り込み (2.19 beta 2, 02.May.2001)
* > New Installer (Gismo Color Palette Objectsを作成する) (2.19 beta 2, 02.May.2001)
* > PB_CreateColorPaletteのFont指定時に発生する不具合を修正 (2.19 beta 3, 15.Jul.2001)
*
*
*
*/
/* Main
*/
Main:
/* Process the arguments.
Get the parent window.
*/
debug_mode = 0
parse source . calledAs .
parent = ""
argCount = arg()
argOff = 0
if( calledAs \= "COMMAND" )then do
if argCount >= 1 then do
parent = arg(1)
argCount = argCount - 1
argOff = 1
end
end; else do
call VROptions 'ImplicitNames'
end
InitArgs.0 = argCount
if( argCount > 0 )then do i = 1 to argCount
InitArgs.i = arg( i + argOff )
end
drop calledAs argCount argOff
/* Load the windows
*/
call VRInit
parse source . . spec
_VREPrimaryWindowPath = ,
VRParseFileName( spec, "dpn" ) || ".VRW"
_VREPrimaryWindow = ,
VRLoad( parent, _VREPrimaryWindowPath )
drop parent spec
if( _VREPrimaryWindow == "" )then do
call VRMessage "", "Cannot load window:" VRError(), ,
"Error!"
_VREReturnValue = 32000
signal _VRELeaveMain
end
/* Process events
*/
call Init
signal on halt
do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
_VREEvent = VREvent()
interpret _VREEvent
end
_VREHalt:
_VREReturnValue = Fini()
call VRDestroy _VREPrimaryWindow
_VRELeaveMain:
call VRFini
exit _VREReturnValue
VRLoadSecondary:
__vrlsWait = abbrev( 'WAIT', translate(arg(2)), 1 )
if __vrlsWait then do
call VRFlush
end
__vrlsHWnd = VRLoad( VRWindow(), VRWindowPath(), arg(1) )
if __vrlsHWnd = '' then signal __vrlsDone
if __vrlsWait \= 1 then signal __vrlsDone
call VRSet __vrlsHWnd, 'WindowMode', 'Modal'
__vrlsTmp = __vrlsWindows.0
if( DataType(__vrlsTmp) \= 'NUM' ) then do
__vrlsTmp = 1
end
else do
__vrlsTmp = __vrlsTmp + 1
end
__vrlsWindows.__vrlsTmp = VRWindow( __vrlsHWnd )
__vrlsWindows.0 = __vrlsTmp
do while( VRIsValidObject( VRWindow() ) = 1 )
__vrlsEvent = VREvent()
interpret __vrlsEvent
end
__vrlsTmp = __vrlsWindows.0
__vrlsWindows.0 = __vrlsTmp - 1
call VRWindow __vrlsWindows.__vrlsTmp
__vrlsHWnd = ''
__vrlsDone:
return __vrlsHWnd
/*:VRX AddTagTemplate
*/
AddTagTemplate:
if debug_mode = 1 then say "AddTagTemplate"
TagTemplateNumber = TagTemplate.0 + 1
tag_template = VRGet( "DDCB_TagTemplateList", "Value" )
TagTemplate.TagTemplateNumber = tag_template
TagTemplate.0 = TagTemplateNumber
call WriteInitialFile
call SetTagTemplateList
return
/*:VRX CB_AlwaysCopy_Click
*/
CB_AlwaysCopy_Click:
if debug_mode = 1 then say "CB_AlwaysCopy_Click"
set = VRGet( "CB_AlwaysCopy", "Set" )
if set = 1 then do
always_copy = "Yes"
ok = VRSet( "PB_Copy", "Enabled", 0 )
end
if set = 0 then do
always_copy = "No"
ok = VRSet( "PB_Copy", "Enabled", 1 )
end
/*
call WriteInitialFile
*/
return
/*:VRX CB_ColorGridTable_Click
*/
CB_ColorGridTable_Click:
if debug_mode = 1 then say "CB_ColorGrid_Click"
set = VRGet( "CB_ColorGridTable", "Set" )
select
when set = 1 then do
color_grid_table = "Enabled"
ok = VRLoadSecondary( "SW_ColorGridTable", )
ok = VRSet( "PB_Gradation", "Visible", 1 )
end
when set = 0 then do
color_grid_table = "Disabled"
color_grid_table = 0
call GetColorGridTablePosition
ok = VRDestroy( "SW_ColorGridTable" )
ok = VRSet( "PB_Gradation", "Visible", 0 )
end
end
return
/*:VRX CB_HexDecChangeoverButton_Click
*/
CB_HexDecChangeoverButton_Click:
if debug_mode = 1 then say "CB_HexDecChangeoverButton_Click"
set = VRGet( "CB_HexDecChangeoverButton", "Set" )
select
when set = 1 then do
hex_dec_changeover_button = "Enabled"
ok = VRSet( "PB_HexDec", "Visible", 1 )
ok = VRSet( "EF_ColorNumber", "Width", color_number_window_width_short )
end
when set = 0 then do
hex_dec_changeover_button = "Disabled"
ok = VRSet( "PB_HexDec", "Visible", 0 )
ok = VRSet( "EF_ColorNumber", "Width", color_number_window_width_long )
end
end
return
/*:VRX CB_MovableTagTemplateWindow_Click
*/
CB_MovableTagTemplateWindow_Click:
if debug_mode = 1 then say "CB_MovableTagTemplateWindow_Click"
set = VRGet( "CB_MovableTagTemplateWindow", "Set" )
select
when set = 1 then
movable_tag_template_window = "Enabled"
when set = 0 then
movable_tag_template_window = "Disabled"
end
if tag_template_window = "Enabled" then do
call SetTagTemplateWindowTitleBar
if movable_tag_template_window = "Disabled" then do
ok = VRDestroy(SW_TagTemplateWindow)
call OpenTagTemplateWindow
end
end
return
/*:VRX CB_TagTemplate_Click
*/
CB_TagTemplate_Click:
if debug_mode = 1 then say "CB_TagTemplate_Click"
call SetPosition
set = VRGet( "CB_TagTemplate", "Set" )
if set = 1 then do
tag_template_window = "Enabled"
call OpenTagTemplateWindow
end
else if set = 0 then do
tag_template_window = "Disabled"
call GetTagTemplateWindowPosition
ok = VRDestroy(SW_TagTemplateWindow)
end
return
/*:VRX ChangeColorValue
*/
ChangeColorValue:
if debug_mode = 1 then say "ChangeColorValue"
/*
* This sub-routine is run when slider (one of any 3 slider bars) bar is changed
*
*/
if sort_type <> "Custom" then do
sort_type_old = sort_type
sort_type = "Custom"
end
backcolor = VRGet( "LB_ColorList", "BackColor" )
if backcolor <> "PaleGray" then do
ok = VRSet( "LB_ColorList", "BackColor", "PaleGray" )
end
forecolor = VRGet( "LB_ColorList", "ForeColor" )
if forecolor <> "DarkGray" then do
ok = VRSet( "LB_ColorList", "ForeColor", "DarkGray" )
end
selected_color_number = red""green""blue
selected_color_name = "#"selected_color_number
flug_colnum = "ON"
/*
flug_spin_red = "ON"
flug_spin_green = "ON"
flug_spin_blue = "ON"
*/
if color_number_indicate_type = "Hexadecimal" then do
ok = VRSet( "EF_ColorNumber", "Value", selected_color_number )
end
else if color_number_indicate_type = "Decimal" then do
ok = VRSet( "EF_ColorNumber", "Value", right(x2d(red), 3, 0)""right(x2d(green), 3, 0)""right(x2d(blue), 3, 0) )
end
ok = VRSet( "SPIN_RedValue", "Value", x2d(red) )
ok = VRSet( "SPIN_GreenValue", "Value", x2d(green) )
ok = VRSet( "SPIN_BlueValue", "Value", x2d(blue) )
/* change color grid table */
if color_grid_table = "Enabled" then do
rr = x2d(red)
gg = x2d(green)
bb = x2d(blue)
cmin = 0
cmax = 255
if sort_type = "Custom" then grid_max = 10 * 22
else grid_max = color.0
do i = 1 to grid_max
rr2 = rr - grid_max/2 + i
if rr2 > cmax then rr2 = cmax
if rr2 < cmin then rr2 = cmin
gg2 = gg - grid_max/2 + i
if gg2 > cmax then gg2 = cmax
if gg2 < cmin then gg2 = cmin
bb2 = bb - grid_max/2 + i
if bb2 > cmax then bb2 = cmax
if bb2 < cmin then bb2 = cmin
if (rr2 = rr) & (gg2 = gg) & (bb2 = bb) then ii = i
color_rgb.i = "("rr2","gg2","bb2")"
custom_color.i = right(d2x(rr2), 2, 0)""right(d2x(gg2), 2, 0)""right(d2x(bb2), 2, 0)
end
color_rgb.0 = grid_max
custom_color.0 = grid_max
ok = VRMethod( "VS_ColorGrid", "SetAttributes", "Values", "color_rgb." )
ok = VRSet( "VS_ColorGrid", "Selected", ii )
ok = VRSet("SW_ColorGridTable", "Caption", "Gismo - Color Grid Table ("sort_type")" )
ok = VRSet( "DT_ColorName", "Caption", "Custom RGB:"custom_color.ii )
end
/* */
call SetColors
if tag_template_window = "Enabled" then call SetTagText
if always_copy = "Yes" then call CopyToClipboard
return
/*:VRX CheckRegistration
*/
CheckRegistration:
/* Registry */
RegisterNumber.0 = 6
RegisterNumber.1 = "GC71585M01" /* Previous User */
RegisterNumber.2 = "GC71585N02" /* New User */
RegisterNumber.3 = "GC71585F03" /* Friends */
RegisterNumber.4 = "GC71585IBM" /* IBMer */
RegisterNumber.5 = "GC71585S05" /* Special Version */
RegisterNumber.6 = "DEMO1999" /* Special Version */
do i = 1 to RegisterNumber.0
if register_number = RegisterNumber.i then Registry = "Registered"
end
/* DEMO用にTime Bomb機能を追加 */
if left(register_number, 4) = "DEMO" then do
CurDate = date("s")
TimeBombDate = "20000101" /* 1999年12月31日まで使用可 */
if CurDate < TimeBombDate then do
nop
end
else do
Registry = "TIME IS UP"
end
end
if Registry <> "Registered" then do
registry_sleep = 15
registry_mode = "Startup"
ok = VRLoadSecondary( "SW_Registry", "w" )
registry_mode = "Normal"
end
return
/*:VRX Color_X2D
*/
Color_X2D:
if debug_mode = 1 then say "Color_X2D"
red = substr(selected_color_number,1,2)
green = substr(selected_color_number,3,2)
blue = substr(selected_color_number,5,2)
red_dec = x2d(red)
green_dec = x2d(green)
blue_dec = x2d(blue)
return
/*:VRX Comparison
*/
Comparison:
/*
if debug_mode = 1 then say "comparison"
*/
method = arg(1)
select
when method = "Hue" then do
if hue_rowdata.i = hue_rowdata.j then do
if saturation_rowdata.i = saturation_rowdata.j then do
less = (value_rowdata.j < value_rowdata.i)
end
else do
less = (saturation_rowdata.j < saturation_rowdata.i)
end
end
else do
less = (hue_rowdata.j < hue_rowdata.i)
end
end
when method = "Saturation" then do
if saturation_rowdata.i = saturation_rowdata.j then do
if value_rowdata.i = value_rowdata.j then do
less = (hue_rowdata.j < hue_rowdata.i)
end
else do
less = (value_rowdata.j < value_rowdata.i)
end
end
else do
less = (saturation_rowdata.j < saturation_rowdata.i)
end
end
when method = "Value" then do
if value_rowdata.i = value_rowdata.j then do
if saturation_rowdata.i = saturation_rowdata.j then do
less = (hue_rowdata.j < hue_rowdata.i)
end
else do
less = (saturation_rowdata.j < saturation_rowdata.i)
end
end
else do
less = (value_rowdata.j < value_rowdata.i)
end
end
when method = "Name" then do
less = (color_rowdata.i < color_rowdata.j)
end
otherwise
nop /* Custom */
end
return
/*:VRX CopyToClipboard
*/
CopyToClipboard:
if debug_mode = 1 then say "CopyToClipboard"
if tag_template_window = "Disabled" then do
if color_mode = "Number" then do
ok = VRMethod("Application", "PutClipboard", "#"selected_color_number)
end
if color_mode = "Name" then do
ok = VRMethod("Application", "PutClipboard", selected_color_name)
end
end
else if tag_template_window = "Enabled" then do
ok = VRMethod("Application", "PutClipboard", tag_text)
end
return
/*:VRX DDCB_BasisColorList_Change
*/
DDCB_BasisColorList_Change:
if debug_mode = 1 then say "DDCB_BasisColorList_Change"
ok = VRMethod( "LB_ColorList", "Clear" )
call SetAllGridToBlack
value = VRGet( "DDCB_BasisColorList", "Value" )
select
when value = "Color Name" then do
basis_color_list = "ColorName"
if color_grid_table = "Enabled" then do
ok = VRSet( "SW_ColorGridTable", "Height", color_grid_table_height_short )
end
ok = VRSet( "RB_RGB", "Enabled", 1 )
ok = VRSet( "RB_RealName", "Enabled", 1 )
call ReadColorList
end
when value = "216 Color Palette" then do
basis_color_list = "216ColorPalette"
if color_grid_table = "Enabled" then do
ok = VRSet( "SW_ColorGridTable", "Height", color_grid_table_height_long )
end
ok = VRSet( "RB_RGB", "Enabled", 0 )
ok = VRSet( "RB_RealName", "Enabled", 0 )
call Set216ColorList
end
end
if color_grid_table = "Enabled" then do
call SetColorGridTableColor
end
return
/*:VRX DDCB_SortType_Change
*/
DDCB_SortType_Change:
if debug_mode = 1 then say "DDCB_SortType_Change"
gismo_height = VRGet( "Window1", "Height" )
selectedtext = VRGet( "DDCB_SortType", "SelectedText" )
ok = VRMethod( "LB_ColorList", "Clear" )
fcs_old = color.fore_color_selected
bcs_old = color.back_color_selected
select
when selectedtext = "Sort by Name" then sort_type = "Name"
when selectedtext = "Sort by Hue" then sort_type = "Hue"
when selectedtext = "Sort by Saturation" then sort_type = "Saturation"
when selectedtext = "Sort by Value" then sort_type = "Value"
otherwise nop
end
/* sort */
call Sort sort_type
ok = VRMethod( "LB_ColorList", "AddStringList", "color." )
ok = VRSet( "LB_ColorList", "Selected", 1 )
do i = 1 to color.0
if fcs_old = color.i then do
fore_color_selected = i
end
if bcs_old = color.i then back_color_selected = i
end
call SetSelectedColor
if color_grid_table = "Enabled" then do
call SetColorGridTableColor
end
return
/*:VRX DDCB_TagTemplateList_Change
*/
DDCB_TagTemplateList_Change:
if debug_mode = 1 then say "DDCB_TagTextList_Change"
tag_template_selected = VRGet( "DDCB_TagTemplateList", "Selected" )
call SetTagText
return
/*:VRX DDCB_TagTemplateList_KeyPress
*/
DDCB_TagTemplateList_KeyPress:
if debug_mode = 1 then say "DDCB_TagTextList_KeyPress"
keystring = VRGet( "DDCB_TagTemplateList", "KeyString" )
if keystring = "{Newline}" then do
call AddTagTemplate
end
return
/*:VRX DefaultValue
*/
DefaultValue:
if debig_mode = 1 then say "DefaultValue"
Mode = "Normal"
gismo_words = "Gismo"
font = "14.Helvetica"
window_font = "<NONE>" /* Normal Fontだけ最初の起動時に設定するように仕様変更 */
color_number_font = "12.Helvetica"
color_position = "Background"
fore_color_selected = 1
back_color_selected = 1
fore_color_name = "NULL"
fore_color_number = 1
back_color_name = "NULL"
back_color_number = 1
selected = 1
ok = VRSet( "RB_Background", "Set", 1 )
ok = VRSet( "RB_Foreground", "Set", 0 )
flug_red = "OFF"
flug_green = "OFF"
flug_blue = "OFF"
flug_colnum = "OFF"
flug_spin_red = "OFF"
flug_spin_green = "OFF"
flug_spin_blue = "OFF"
red = 0
green = 0
blue = 0
color_mode = "Name"
ok = VRSet( "RB_RGB", "Set", 0 )
ok = VRSet( "RB_RealName", "Set", 1 )
always_copy = "No"
ok = VRSet( "CB_AlwaysCopy", "Set", 0 )
ok = VRSet( "PB_Copy", "Enabled", 1 )
position_x = 0
position_y = 0
preference_x = 0
preference_y = 0
ok = VRSet( "LB_ColorList", "BackColor", "White" )
tag_template_window = "Disabled"
about_window = "Disabled"
sort_type = "Name"
ribbon_color = "DynamicColor"
color_grid_table = "Disabled"
ok = VRSet( "PB_Gradation", "Visible", 0 )
color_grid_table_pos_x = 3000
color_grid_table_pos_y = 2000
color_number_indicate_type = "Hexadecimal"
/* HexDec Button (Default is Disabled) */
hex_dec_changeover_button = "Disabled"
ok = VRSet( "PB_HexDec", "Visible", 0 )
ok = VRSet( "EF_ColorNumber", "Width", color_number_window_width_long )
register_number = "Unregistered"
color_number_window_width_short = 1457
color_number_window_width_long = 1879
tag_template_window_height_short = 1060
tag_template_window_height_long = 1337
movable_tag_template_window = "Disabled"
/*
color_grid_table_height_short = 3497
color_grid_table_height_long = 5107
*/
color_grid_table_height_short = 3497 + 420
color_grid_table_height_long = 5107 + 420
return
/*:VRX EF_ColorNumber_Change
*/
EF_ColorNumber_Change:
if debug_mode = 1 then say "EF_ColorNumber_Change"
if flug_colnum = "OFF" then do
value = VRGet( "EF_ColorNumber", "Value" )
this_is_not_number = "No"
ok = VRSet( "EF_ColorNumber", "BackColor", "Black" )
if color_number_indicate_type = "Hexadecimal" then do
if length(value) = 6 then do
n1 = left(right(value, 6), 1)
n2 = left(right(value, 5), 1)
n3 = left(right(value, 4), 1)
n4 = left(right(value, 3), 1)
n5 = left(right(value, 2), 1)
n6 = right(value, 1)
if n1 > F then this_is_not_number = "Yes"
if n2 > F then this_is_not_number = "Yes"
if n3 > F then this_is_not_number = "Yes"
if n4 > F then this_is_not_number = "Yes"
if n5 > F then this_is_not_number = "Yes"
if n6 > F then this_is_not_number = "Yes"
if this_is_not_number = "No" then do
selected_color_number = right(value, 6)
flug_red = "ON"
flug_green = "ON"
flug_blue = "ON"
/*
flug_spin_red = "ON"
flug_spin_green = "ON"
flug_spin_blue = "ON"
*/
call SetColorBars
call ChangeColorValue
end
else do
ok = VRSet( "EF_ColorNumber", "BackColor", "Red" )
end
end
end
else if color_number_indicate_type = "Decimal" then do
if length(value) = 9 then do
if datatype(value) <> "NUM" then do
this_is_not_number = "Yes"
end
red_dec = substr(value, 1, 3)
green_dec = substr(value, 4, 3)
blue_dec = substr(value, 7, 3)
select
when red_dec > 255 then
ok = VRSet( "EF_ColorNumber", "BackColor", "Red" )
when green_dec > 255 then
ok = VRSet( "EF_ColorNumber", "BackColor", "Red" )
when blue_dec > 255 then
ok = VRSet( "EF_ColorNumber", "BackColor", "Red" )
otherwise do
if this_is_not_number = "No" then do
selected_color_number = right(d2x(red_dec), 2, 0)""right(d2x(green_dec), 2, 0)""right(d2x(blue_dec), 2, 0)
flug_red = "ON"
flug_green = "ON"
flug_blue = "ON"
/*
flug_spin_red = "ON"
flug_spin_green = "ON"
flug_spin_blue = "ON"
*/
call SetColorBars
call ChangeColorValue
end
else do
ok = VRSet( "EF_ColorNumber", "BackColor", "Red" )
end
end
end
end
end
end
flug_colnum = "OFF"
return
/*:VRX EF_RegistoryNumber_Change
*/
EF_RegistoryNumber_Change:
ok = VRSet( "PB_Registory", "Enabled", 1 )
return
/*:VRX Fini
*/
Fini:
window = VRWindow()
call VRSet window, "Visible", 0
drop window
return 0
/*:VRX GetColorGridTablePosition
*/
GetColorGridTablePosition:
if debug_mode = 1 then say "GetColorGridTablePosition"
color_grid_table_pos_x = VRGet("SW_ColorGridTable", "Left")
color_grid_table_pos_y = VRGet("SW_ColorGridTable", "Top" )
call WriteInitialFile
return
/*:VRX GetTagTemplateWindowPosition
*/
GetTagTemplateWindowPosition:
if debug_mode = 1 then say "GetTagTemplateWindowPosition"
extension_x = VRGet( "SW_TagTemplateWindow", "Left" )
extension_y = VRGet( "SW_TagTemplateWindow", "Top" )
call WriteInitialFile
return
/*:VRX Halt
*/
Halt:
signal _VREHalt
return
/*:VRX Init
*/
Init:
Gismo_version = "2.19 beta 3"
call VRSet "console", "WindowListTitle", ""
call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
call sysloadfuncs
ok = VRSet("Window1", "Caption", "Gismo "Gismo_version)
ok = VRSet("Window1", "WindowListTitle", "Gismo for OS/2 "Gismo_version )
call DefaultValue
gismo_directory = VRCurrDrive()||VRCurrDir()
ini_file = gismo_directory"\Gismo.ini"
rc = SysFileTree( gismo_directory"\color.lst", "color_list.", "of" )
select
when color_list.0 = 1 then do
end
otherwise do
call VRMessage VRWindow(), "GISMO ERROR! : NO COLOR LIST FILE! ", "Gismo Error"
call Quit
end
end
/* default color */
selected_color_name = color.1
selected_color_number = number.1
/* sort items */
sort_type_list.0 = 4
sort_type_list.1 = "Sort by Name"
sort_type_list.2 = "Sort by Hue"
sort_type_list.3 = "Sort by Saturation"
sort_type_list.4 = "Sort by Value"
ok = VRMethod( "DDCB_SortType", "AddStringList", "sort_type_list.", )
/* Basis Color List */
basis_color_list.0 = 2
basis_color_list.1 = "Color Name"
basis_color_list.2 = "216 Color Palette"
ok = VRMethod( "DDCB_BasisColorList", "AddStringList", "basis_color_list.", )
/* 256 Color List */
do i = 1 to 256
spin_color.i = i - 1
end
spin_color.0 = i - 1
ok = VRMethod( "SPIN_RedValue", "SetStringList", "spin_color." )
ok = VRMethod( "SPIN_GreenValue", "SetStringList", "spin_color." )
ok = VRMethod( "SPIN_BlueValue", "SetStringList", "spin_color." )
/*
if basis_color_list = "216ColorPalette" then do
ok = VRSet( "DDCB_BasisColorList", "Value", "216 Color Palette" )
call Set216ColorList
if fore_color_selected > Color216.0 then fore_color_selected = Color216.0
if back_color_selected > Color216.0 then back_color_selected = Color216.0
end
else do
ok = VRSet( "DDCB_BasisColorList", "Value", "Color Name" )
call ReadColorList
if fore_color_selected > color_list.0 then fore_color_selected = color_list.0
if back_color_selected > color_list.0 then back_color_selected = color_list.0
end
select
when sort_type = "Name" then ok = VRSet( "DDCB_SortType", "Selected", 1 )
when sort_type = "Hue" then ok = VRSet( "DDCB_SortType", "Selected", 2 )
when sort_type = "Saturation" then ok = VRSet( "DDCB_SortType", "Selected", 3 )
when sort_type = "Value" then ok = VRSet( "DDCB_SortType", "Selected", 4 )
otherwise do
sort_type = "Name"
ok = VRSet( "DDCB_SortType", "Selected", 1 )
end
end
old_sort_type = sort_type
*/
/* read initial file */
call ReadInitialFile
if basis_color_list = "216ColorPalette" then do
ok = VRSet( "DDCB_BasisColorList", "Value", "216 Color Palette" )
call Set216ColorList
if fore_color_selected > Color216.0 then fore_color_selected = Color216.0
if back_color_selected > Color216.0 then back_color_selected = Color216.0
end
else do
ok = VRSet( "DDCB_BasisColorList", "Value", "Color Name" )
call ReadColorList
if fore_color_selected > color_list.0 then fore_color_selected = color_list.0
if back_color_selected > color_list.0 then back_color_selected = color_list.0
end
select
when sort_type = "Name" then ok = VRSet( "DDCB_SortType", "Selected", 1 )
when sort_type = "Hue" then ok = VRSet( "DDCB_SortType", "Selected", 2 )
when sort_type = "Saturation" then ok = VRSet( "DDCB_SortType", "Selected", 3 )