| 1 | package TUI::Dialogs::Const; | ||
| 2 | # ABSTRACT: constants for dialog components | ||
| 3 | |||
| 4 | 42 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 42 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 42 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 42 | our $VERSION = '2.000002'; | |
| 9 | 42 | $VERSION =~ tr/_//d; | |
| 10 | 42 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |
| 11 | |||
| 12 | 42 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 42 | our @EXPORT_OK = qw( | |
| 15 | ); | ||
| 16 | |||
| 17 | 42 | our %EXPORT_TAGS = ( | |
| 18 | |||
| 19 | bfXXXX => [qw( | ||
| 20 | bfNormal | ||
| 21 | bfDefault | ||
| 22 | bfLeftJust | ||
| 23 | bfBroadcast | ||
| 24 | bfGrabFocus | ||
| 25 | )], | ||
| 26 | |||
| 27 | cmXXXX => [qw( | ||
| 28 | cmRecordHistory | ||
| 29 | cmGrabDefault | ||
| 30 | cmReleaseDefault | ||
| 31 | )], | ||
| 32 | |||
| 33 | cpXXXX => [qw( | ||
| 34 | cpGrayDialog | ||
| 35 | cpBlueDialog | ||
| 36 | cpCyanDialog | ||
| 37 | cpButton | ||
| 38 | cpCluster | ||
| 39 | cpDialog | ||
| 40 | cpInputLine | ||
| 41 | cpLabel | ||
| 42 | cpStaticText | ||
| 43 | cpHistoryViewer | ||
| 44 | cpHistoryWindow | ||
| 45 | cpHistory | ||
| 46 | )], | ||
| 47 | |||
| 48 | dpXXXX => [qw( | ||
| 49 | dpBlueDialog | ||
| 50 | dpCyanDialog | ||
| 51 | dpGrayDialog | ||
| 52 | )], | ||
| 53 | |||
| 54 | ); | ||
| 55 | |||
| 56 | # add all the other %EXPORT_TAGS ":class" tags to the ":all" class and | ||
| 57 | # @EXPORT_OK, deleting duplicates | ||
| 58 | { | ||
| 59 | 42 | my %seen; | |
| 60 | push | ||
| 61 | @EXPORT_OK, | ||
| 62 | 966 | grep {!$seen{$_}++} @{$EXPORT_TAGS{$_}} | |
| 63 | 42 | foreach keys %EXPORT_TAGS; | |
| 64 | push | ||
| 65 | 42 | @{$EXPORT_TAGS{all}}, | |
| 66 | @EXPORT_OK; | ||
| 67 | } | ||
| 68 | |||
| 69 | # Button flags | ||
| 70 | |||
| 71 | 42 | ▶ | use constant { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 72 | 42 | bfNormal => 0x00, | |
| 73 | bfDefault => 0x01, | ||
| 74 | bfLeftJust => 0x02, | ||
| 75 | bfBroadcast => 0x04, | ||
| 76 | bfGrabFocus => 0x08, | ||
| 77 | 42 | }; | |
| 78 | |||
| 79 | # Command constants | ||
| 80 | |||
| 81 | 42 | ▶ | use constant { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 82 | # History Command constants | ||
| 83 | 42 | cmRecordHistory => 60, | |
| 84 | |||
| 85 | # TButton Command constants | ||
| 86 | cmGrabDefault => 61, | ||
| 87 | cmReleaseDefault => 62, | ||
| 88 | 42 | }; | |
| 89 | |||
| 90 | # TDialog palette layout | ||
| 91 | |||
| 92 | 42 | ▶ | use constant cpGrayDialog => |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 93 | "\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F". | ||
| 94 | 42 | "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F"; | |
| 95 | |||
| 96 | 42 | ▶ | use constant cpBlueDialog => |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 97 | "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f". | ||
| 98 | 42 | "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"; | |
| 99 | |||
| 100 | 42 | ▶ | use constant cpCyanDialog => |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 101 | "\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f". | ||
| 102 | 42 | "\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"; | |
| 103 | |||
| 104 | 42 | ▶ | use constant cpDialog => cpGrayDialog; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 105 | |||
| 106 | # TButton palette layout | ||
| 107 | |||
| 108 | 42 | ▶ | use constant cpButton => "\x0A\x0B\x0C\x0D\x0E\x0E\x0E\x0F"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 109 | |||
| 110 | # TStaticText palette layout | ||
| 111 | |||
| 112 | 42 | ▶ | use constant cpStaticText => "\x06"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 113 | |||
| 114 | # TInputLine palette layout | ||
| 115 | |||
| 116 | 42 | ▶ | use constant cpInputLine => "\x13\x13\x14\x15"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 117 | |||
| 118 | # TLabel palette layout | ||
| 119 | |||
| 120 | 42 | ▶ | use constant cpLabel => "\x07\x08\x09\x09"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 121 | |||
| 122 | # TCluster palette layout | ||
| 123 | |||
| 124 | 42 | ▶ | use constant cpCluster => "\x10\x11\x12\x12\x1f"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 125 | |||
| 126 | # THistoryViewer palette layout | ||
| 127 | |||
| 128 | 42 | ▶ | use constant cpHistoryViewer => "\x06\x06\x07\x06\x06"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 129 | |||
| 130 | # THistoryWindow palette layout | ||
| 131 | |||
| 132 | 42 | ▶ | use constant cpHistoryWindow => "\x13\x13\x15\x18\x17\x13\x14"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 133 | |||
| 134 | # THistory palette layout | ||
| 135 | |||
| 136 | 42 | ▶ | use constant cpHistory => "\x16\x17"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 137 | |||
| 138 | # TDialog palette entries | ||
| 139 | |||
| 140 | 42 | ▶ | use constant { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 141 | 42 | dpBlueDialog => 0, | |
| 142 | dpCyanDialog => 1, | ||
| 143 | dpGrayDialog => 2, | ||
| 144 | 42 | }; | |
| 145 | |||
| 146 | 42 | 1 | |
| 147 | |||
| 148 | __END__ | ||