home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ViewTester / Sources / Views.fr < prev    next >
Encoding:
Text File  |  1996-09-17  |  5.3 KB  |  191 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //    File:                Views.fr
  3. //    Release Version:    $ ODF 2 $
  4. //
  5. //    Contains:            Resources defining the ViewTester dialog
  6. //
  7. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  8. //========================================================================================
  9.  
  10. #ifndef FWRESFIL_K
  11. #include "FWResFil.k"
  12. #endif
  13.  
  14. #ifndef FWVIEWS_FR
  15. #include "FWViews.fr"
  16. #endif
  17.  
  18. #ifndef FWNOTDEF_H
  19. #include "FWNotDef.h"     
  20. #endif
  21.  
  22. #ifndef DEFINES_K
  23. #include "Defines.k"
  24. #endif
  25.  
  26. //========================================================================================
  27. // Defines
  28. //========================================================================================
  29.  
  30. #define GENEVA_10        { FW_FIX(10), FW_kPlain, "applFont" }
  31.  
  32. #define H    FW_FIX(kPictureWidth)
  33. #define V    FW_FIX(kPictureHeight)
  34. #define H1    H + FW_FIX(1)
  35. #define V1    V + FW_FIX(1)
  36.  
  37. //========================================================================================
  38. // resource RFormFrame(kMainViewID)
  39. //========================================================================================
  40. // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
  41.  
  42. resource FW_RFrameLayout(kMainViewID)
  43. {
  44.     { H, V},                    // LayoutSize
  45.     
  46.     {                        // Start list of frame's subviews
  47.         FW_RPictSView
  48.         (
  49.             0,                            // view id
  50.             {0, 0, H, V},                // bounds
  51.             FW_kFixedBounds,            // bindings
  52.             {FW_FIX(0),FW_FIX(0)},        // will use the pict size
  53.             0,                            // Make it the ContentView
  54.             FW_kNoScrolling,            // scrolling direction
  55.             { },                        // no subviews
  56.             128                            // picture id
  57.         ),
  58.         FW_REditView    
  59.         (
  60.             1,                                // view id
  61.             { FW_FIX(14),FW_FIX(448),FW_FIX(556),FW_FIX(476)},
  62.             FW_kFixedBounds,                // binding
  63.             -1,                                // max chars
  64.             13,                                // attributes
  65.             GENEVA_10,
  66.             ""                                // initial text
  67.         ),
  68.         FW_RButton
  69.         (
  70.             2,                                // view id
  71.             { FW_FIX(190),FW_FIX(480),FW_FIX(395),FW_FIX(495)},
  72.             FW_kFixedBounds,                // binding
  73.             0,                                // control message
  74.             0,                                // control receiver
  75.             0,                                // control value
  76.             FW_kCheckButton,                // button kind
  77.             GENEVA_10,
  78.             "Turn Off Warnings (Debugger breaks)"            
  79.         )
  80. #if 0
  81.         ,
  82.         FW_RGrowBox
  83.         (
  84.             'grow',                        // view ID
  85.             {H - FW_SBSIZE, V - FW_SBSIZE, H1, V1},        // bounds
  86.             FW_kGrowBoxBinding            // standard grow box binding
  87.         )
  88. #endif
  89.     },                        // End list of frame's subviews
  90.     { }                        // no scroller
  91. };
  92.  
  93. //========================================================================================
  94. // resource FW_RFrameLayout(kDialogID)
  95. //========================================================================================
  96. // See constants in "FWViews.k", macros & resource types in "FWViews.fr"
  97.  
  98. resource FW_RFrameLayout(kDialogID)
  99. {
  100.     {FW_FIX(100),FW_FIX(100)},        // LayoutSize
  101.     
  102.     {                        // Start list of frame's subviews
  103.         FW_RStaticText
  104.         (
  105.             0,                            // view id
  106.             { FW_FIX(10),FW_FIX(5),FW_FIX(280),FW_FIX(30)},
  107.             FW_kFixedBounds,            // binding
  108.             GENEVA_10,
  109.             FW_RGB_WHITE,
  110.             "Pick a resource name from the popup or type an id             \r(popup shows only named resources)"            
  111.         ),
  112.         FW_RPopupMenu
  113.         (
  114.             kMacAppPopupID,                // view id
  115.             { FW_FIX(5),FW_FIX(40),FW_FIX(250),FW_FIX(60)},
  116.             FW_kFixedBounds,                // binding
  117.             FW_kPopupClickedMsg,            // control message
  118.             FW_kFrameReceiver,                // control receiver
  119.             0,                                // control value
  120.             128,                            // Mac menu id
  121.             110,                            // title width
  122.             1,                                // Initial menu item
  123.             4,                                // Menu variation controls.h
  124.             'View',                            // Menu refCon    
  125.             FW_SYSTEM_FONT,
  126.             "MacApp Views"                    // title
  127.         ),
  128.         FW_RPopupMenu
  129.         (
  130.             kPPobPopupID,                // view id
  131.             { FW_FIX(5),FW_FIX(70),FW_FIX(250),FW_FIX(90)},
  132.             FW_kFixedBounds,                // binding
  133.             FW_kPopupClickedMsg,            // control message
  134.             FW_kFrameReceiver,                // control receiver
  135.             0,                                // control value
  136.             129,                            // Mac menu id
  137.             110,                            // title width
  138.             1,                                // Initial menu item
  139.             4,                                // Menu variation controls.h
  140.             'PPob',                            // Menu refCon    
  141.             FW_SYSTEM_FONT,
  142.             "PPob Resources"                // title
  143.         ),
  144.         FW_REditView        // edit view to enter new password
  145.         (
  146.             kMacAppEditID,            // view id
  147.             { FW_FIX(260),FW_FIX(40),FW_FIX(320),FW_FIX(60)},
  148.             FW_kFixedBounds,            // binding
  149.             10,                            // max chars
  150.             9,                            // attributes
  151.             FW_NORMAL_FONT, 
  152.             ""                            // initial text
  153.         ), 
  154.         FW_REditView        // edit view to enter new password
  155.         (
  156.             kPPobEditID,            // view id
  157.             { FW_FIX(260),FW_FIX(70),FW_FIX(320),FW_FIX(90)},
  158.             FW_kFixedBounds,            // binding
  159.             10,                            // max chars
  160.             9,                            // attributes
  161.             FW_NORMAL_FONT, 
  162.             ""                            // initial text
  163.         ), 
  164.         FW_RButton
  165.         (
  166.             kOKButtonID,                // view id
  167.             { FW_FIX(180),FW_FIX(120),FW_FIX(260),FW_FIX(148)},
  168.             FW_kFixedBounds,            // binding
  169.             FW_kDefaultButtonMsg,        // "OK" message
  170.             0,                            // receiver = dialogFrame by default
  171.             0,                            // control value
  172.             FW_kDefaultPushButton,        // button kind (with outline)
  173.             FW_SYSTEM_FONT,
  174.             "OK"            
  175.         ),
  176.         FW_RButton
  177.         (
  178.             kCancelButtonID,            // view id
  179.             { FW_FIX(60),FW_FIX(123),FW_FIX(120),FW_FIX(145)},
  180.             FW_kFixedBounds,            // binding
  181.             FW_kCancelButtonMsg,        // "Cancel" message
  182.             0,                            // receiver = dialogFrame by default
  183.             0,                            // control value
  184.             FW_kPushButton,                // button kind
  185.             FW_SYSTEM_FONT,
  186.             "Cancel"            
  187.         )
  188.     },                        // End list of frame's subviews
  189.     { }                        // no scroller
  190. }; 
  191.