Professional GEM: Difference between revisions

From Atari Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
* [[Go to Professional GEM page 01 to 06]]
+
{{Professional GEM}}
PART - I. Windows .................................. 1
 
IN THE BEGINNING .................................. 1
 
windcreate()......................................... 1
 
windget()............................................ 1
 
OPEN SESAME! ..................................... 3
 
windopen()........................................... 3
 
windget()............................................ 3
 
windcalc()........................................... 3
 
windset()............................................ 3
 
CLEANING UP ...................................... 4
 
windclose().......................................... 4
 
winddelete()......................................... 4
 
THOSE FAT SLIDERS ................................. 4
 
windset()............................................ 5
 
windset()............................................ 5
 
windget()............................................ 5
 
COMING UP NEXT .................................... 6
 
FEEDBACK ........................................ 6
 
   
  +
'''Professional GEM''' was a series of articles by [[Tim Oren]]. The articles {{--}} published by the [[ANTIC online]] magazine in 1985/86 {{--}} provide a good introduction in [[GEM]] programming.
* [[Go to Professional GEM page 07 to 15]]
 
PART - II. Windows ................................. 7
 
EXCELSIOR ....................................... 7
 
REDRAWING WINDOWS ................................ 7
 
CAVEAT EMPTOR .................................... 7
 
INTO THE BITS ..................................... 8
 
A SMALL CONFESSION ................................ 9
 
WINDOW CONTROL REQUESTS ........................... 10
 
windset()............................................ 10
 
rcconstrain()........................................ 10
 
align().............................................. 10
 
windset()............................................ 12
 
WINDOW SLIDER MESSAGES ............................ 12
 
windset.............................................. 12
 
A COMMON BUG ...................................... 13
 
DEPT. OF DIRTY TRICKS .............................. 14
 
windget()............................................ 14
 
windset()............................................ 14
 
A SIN OF OMISSION .................................. 15
 
COMING SOON ...................................... 15
 
 
* [[Go to Professional GEM page 16 to 23]]
 
PART - III. THE DIALOG HANDLER ....................... 16
 
A MEANINGFUL DIALOG ............................... 16
 
DEFINING TERMS ................................... 16
 
rsrcload()........................................... 17
 
rsrcgaddr().......................................... 17
 
BUG ALERT! ....................................... 17
 
A HANDY TRICK ..................................... 19
 
CLEAN UP ......................................... 20
 
deselobj()........................................... 20
 
RECAP ........................................... 20
 
BUTTON BUTTON .................................... 20
 
selobj()............................................. 21
 
WHO'S GOT THE BUTTON? .............................. 21
 
selobj()............................................. 22
 
COMING UP NEXT .................................... 22
 
DISPELL GREMLINS ................................. 23
 
 
* [[Go to Professional GEM page 24 to 30]]
 
PART - IV. Resource Structure ....................... 24
 
A MAZE OF TWISTY LITTLE PASSAGES. .................... 24
 
PUTTING IT TO WORK ................................. 28
 
LETTERS WE GET LETTERS ............................. 30
 
STRAW POLL! ...................................... 30
 
STAY TUNED! ...................................... 30
 
 
* [[Go to Professional GEM page 32 to 37]]
 
PART - V. Resource Tree Structures ................... 32
 
HOW GEM DOES IT. ................................... 34
 
THOUGHT EXPERIMENTS .............................. 36
 
A TREEWALKER OF OUR OWN ............................. 37
 
 
* [[Go to Professional GEM page 39 to 48]]
 
PART - VI. Raster operations ........................ 39
 
SEASONS GREETINGS ................................ 39
 
DEFINING TERMS ................................... 39
 
MONOCHROME VS. COLOR .............................. 39
 
STANDARD VS. DEVICE-SPECIFIC FORMAT ................ 40
 
EVEN-WORD VS. FRINGES ............................. 41
 
MFDB's .......................................... 41
 
LET'S OPERATE .................................... 42
 
TRANSFORM FORM ................................... 42
 
vrtrnfm()............................................ 42
 
COPY RASTER OPAQUE ................................ 43
 
vrocpyfm()........................................... 43
 
COPY RASTER TRANSPARENT ........................... 44
 
vrtcpyfm()........................................... 44
 
THE MODE PARAMETER ................................ 44
 
REPLACE MODE ..................................... 45
 
ERASE MODE ....................................... 45
 
XOR MODE ......................................... 45
 
TRANSPARENT MODE ................................. 45
 
REVERSE TRANSPARENT MODE .......................... 45
 
THE PROBLEM OF COLOR ............................... 45
 
OPTIMIZING RASTER OPERATIONS ...................... 46
 
AVOID MERGED COPIES ............................... 46
 
MOVE TO CORRESPONDING PIXELS ....................... 46
 
AVOID FRINGES .................................... 47
 
USE ANOTHER METHOD ................................ 47
 
FEEDBACK RESULTS ................................. 47
 
THE NEXT QUESTION ................................. 47
 
COMING UP SOON .................................... 48
 
 
* [[Go to Professional GEM page 49 to 56]]
 
PART - VII. Menu Structures ......................... 49
 
HAPPY NEW YEAR .................................... 49
 
MENU BASICS ...................................... 49
 
MENU STRUCTURES .................................. 49
 
USING THE MENU .................................... 51
 
rsrcgaddr().......................................... 51
 
menubar()............................................ 51
 
menutnormal()........................................ 52
 
GETTING FANCY .................................... 52
 
menuienable()........................................ 52
 
setmenu()............................................ 53
 
CHECK PLEASE? .................................... 53
 
menuicheck()......................................... 53
 
NOW YOU SEE IT NOW YOU DON'T .......................... 53
 
menutext()........................................... 54
 
LUNCH AND DINNER MENUS ............................. 54
 
DO IT YOURSELF .................................... 54
 
MAKE PRETTY ...................................... 55
 
THAT'S IT FOR NOW! ................................. 56
 
 
* [[Go to Professional GEM page 57 to 66]]
 
PART - VIII. USER INTERFACES ........................ 57
 
AND NOW FOR SOMETHING COMPLETELY DIFFERENT! .......... 57
 
CREDIT WHERE IT'S DUE .............................. 57
 
FINGERTIPS ...................................... 57
 
MUSCLES ......................................... 58
 
EYES ............................................ 59
 
SHORT-TERM MEMORY ................................ 60
 
CHUNKING ........................................ 60
 
THINK! .......................................... 61
 
ARE WE NOT MEN? .................................... 61
 
OF MODES AND BANDWIDTH ............................. 65
 
TO DO IS TO BE! ..................................... 66
 
AMEN... ......................................... 66
 
 
* [[Go to Professional GEM page 68 to 76]]
 
PART - IX. VDI Graphics: Lines and Solids .............. 68
 
A BIT OF HISTORY ................................... 68
 
vswrmode()........................................... 69
 
vsclip()............................................. 69
 
THE LINE FORMS ON THE LEFT ........................... 70
 
vslcolor()........................................... 70
 
vslwidth()........................................... 70
 
vslends()............................................ 70
 
vsltype()............................................ 70
 
vsludsty()........................................... 71
 
vpline()............................................. 71
 
vrbox().............................................. 72
 
varc()............................................... 72
 
vellarc()............................................ 73
 
SOLIDS .......................................... 73
 
vsfcolor()........................................... 74
 
vsfperimeter()....................................... 74
 
vsfinterior()........................................ 74
 
vsfstyle()........................................... 74
 
vsfudpat()........................................... 75
 
vfillarea().......................................... 75
 
vrrecfl()............................................ 75
 
vcircle()............................................ 76
 
vellipse()........................................... 76
 
vpieslice().......................................... 76
 
vellpie()............................................ 76
 
vrfbox()............................................. 76
 
TO BE CONTINUED ................................... 76
 
 
* [[Go to Professional GEM page 77 to 114]]
 
APPENDICES................................................. 77
 
Appendix - I Sample Code for Part II.................... 78
 
Appendix - II Sample Code for Part III.................. 83
 
Appendix - III Sample Code for Part IV.................. 88
 
Appendix - IV Sample Code for Part V.................... 98
 
Appendix - V Sample Code for Part VI.................... 103
 
Appendix - VI Sample Code for Part VII.................. 108
 
Appendix - VII Sample Code for Part IX.................. 112
 
Appendix - VIII Sample Code for Part X.................. 114
 

Latest revision as of 15:57, 12 October 2011

Professional GEM
Part I -- Windows
In the beginningOpen sesameCleaning upThose fat slidersComing up nextFeedback
Part II -- Windows
ExcelsiorRedrawing windowsCaveat emptorInto the bitsA small confessionWindow control requestWindow slider messagesA common bugDept. of dirty tricksA sin of omissionComing soon
Part III -- The dialog handler
A meaningful dialogDefining termsBug alert!A handy trickClean upRecapButton ButtonWho's got the button?Coming up nextDispell gremlins
Part IV -- Resource structure
A maze of twisty little passagesPutting it to workLetters, we get lettersStraw poll!Stay tuned!
Part V -- Resource tree structures
How GEM does itThought experimentsA treewalker of our own
Part VI -- Raster operations
Seasons greetingsDefining termsMonochrome vs. colorStandard vs. device-specific formatEven-word vs. fringesMFDB'sLet's operateTransform formCopy raster opaqueCopy raster transparentThe mode parameterReplace modeErase modeXor modeTransparent modeReverse transparent modeThe problem of colorOptimizing raster operationsAvoid merged copiesMove to corresponding pixelsAvoid fringesUse another methodFeedback resultsThe next questionComing up soon
Part VII -- Menu structures
Happy new yearMenu basicsMenu structuresUsing the menuGetting fancyCheck please?Now you see it now you don'tLunch and dinner menusDo it yourselfMake prettyThat's it for now!
Part VIII -- User interfaces
And now for something completely different!Credit where it's dueFingertipsMusclesEyesShort-term memoryChunkingThink!Are we not men?Of modes and bandwidthTo do is to be!Amen...
Part IX -- VDI Graphics: Lines and solids
A bit of historyThe line forms on the leftSolidsTo be continued
Appendices
Main page

Professional GEM was a series of articles by Tim Oren. The articles -- published by the ANTIC online magazine in 1985/86 -- provide a good introduction in GEM programming.