home *** CD-ROM | disk | FTP | other *** search
/ CLIX - Fazer Clix Custa Nix / CLIX-CD.cdr / mac / lib / Mac / Pane.pm < prev    next >
Text File  |  1998-02-28  |  2KB  |  131 lines

  1. =head1 NAME
  2.  
  3. Pane.pm - Panes in windows
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.     package XXX;
  8.     use Mac::Pane;
  9.     @ISA = qw(Mac::Pane);
  10.     
  11. =head1 DESCRIPTION
  12.  
  13. The MacWindow class dispatches the events it gets to a number of panes. Panes are
  14. typically one of
  15.  
  16. =over 4
  17.  
  18. =item Individual panes
  19.  
  20. in which an instance of a pane object is allocated for each element (e.g. a movie
  21. controller).
  22.  
  23. =item Collective panes
  24.  
  25. in which a single instance controls all elements of a type (e.g., a control).
  26.  
  27. =back
  28.  
  29. =head2 Member functions
  30.  
  31. =over 4
  32.  
  33. All member functions take as their first two arguments the pane object and the
  34. window object. The latter makes it possible to implement flyweight panes.
  35.  
  36. =cut    
  37. package Mac::Pane;
  38.  
  39. =item new(WINDOW)
  40.  
  41. Creates a new pane and attachs it to a MacWindow if one is given.
  42.  
  43. =cut
  44. sub new {
  45.     my($class, $window) = @_;
  46.     my($me) = bless {}, $class;
  47.     
  48.     $window->add_pane($me) if $window;
  49.     
  50.     $me;
  51. }
  52.  
  53. =item attach(WINDOW)
  54.  
  55. Called by MacWindow to indicate that the pane has just been attached.
  56.  
  57. =cut
  58. sub attach {
  59. }
  60.  
  61. =item detach(WINDOW)
  62.  
  63. Called by MacWindow to indicate that the pane has just been detached.
  64.  
  65. =cut
  66. sub detach {
  67. }
  68.  
  69. =item activate(WINDOW, ACTIVE, SUSPEND)
  70.  
  71. Handle activate/suspend events.
  72.  
  73. =cut
  74. sub activate {
  75. }
  76.  
  77. =item focus(WINDOW, FOCUS)
  78.  
  79. Called by MacWindow to indicate that the pane has acquired (1) or lost (0) the 
  80. focus.
  81.  
  82. =cut
  83. sub focus {
  84. }
  85.  
  86. =item redraw(WINDOW)
  87.  
  88. Redraw the contents of the pane.
  89.  
  90. =cut
  91. sub redraw {
  92. }
  93.  
  94. =item key(WINDOW, KEY)
  95.  
  96. Handle a key stroke.
  97.  
  98. =cut
  99. sub key {
  100.     0;
  101. }
  102.  
  103. =item click(WINDOW, PT)
  104.  
  105. Handle a click.
  106.  
  107. =cut
  108. sub click {
  109.     0;
  110. }
  111.  
  112. =item cursor(WINDOW, PT)
  113.  
  114. Adjust the cursor if appropriate.
  115.  
  116. =cut
  117. sub cursor {
  118.     0;
  119. }
  120.  
  121. =item idle(WINDOW)
  122.  
  123. Perform regular tasks (like blinking an insertion point). Must be enabled with
  124. C<add_idle>.
  125.  
  126. =cut
  127. sub idle {
  128. }
  129.  
  130. 1;
  131.