home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / contrib / include / wx / ogl / divided.h < prev    next >
C/C++ Source or Header  |  2002-09-08  |  2KB  |  76 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        divided.h
  3. // Purpose:     wxDividedShape
  4. // Author:      Julian Smart
  5. // Modified by:
  6. // Created:     12/07/98
  7. // RCS-ID:      $Id: divided.h,v 1.2 2002/09/07 12:10:20 GD Exp $
  8. // Copyright:   (c) Julian Smart
  9. // Licence:       wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef _OGL_DIVIDED_H_
  13. #define _OGL_DIVIDED_H_
  14.  
  15. #if defined(__GNUG__) && !defined(__APPLE__)
  16. #pragma interface "basic.h"
  17. #endif
  18.  
  19. /*
  20.  * Definition of a region
  21.  *
  22.  */
  23.  
  24. /*
  25.  * Box divided into horizontal regions
  26.  *
  27.  */
  28.  
  29. extern wxFont *g_oglNormalFont;
  30. class wxDividedShape: public wxRectangleShape
  31. {
  32.  DECLARE_DYNAMIC_CLASS(wxDividedShape)
  33.  
  34.  public:
  35.   wxDividedShape(double w = 0.0, double h = 0.0);
  36.   ~wxDividedShape();
  37.  
  38.   void OnDraw(wxDC& dc);
  39.   void OnDrawContents(wxDC& dc);
  40.  
  41.   void SetSize(double w, double h, bool recursive = TRUE);
  42.  
  43.   void MakeControlPoints();
  44.   void ResetControlPoints();
  45.  
  46.   void MakeMandatoryControlPoints();
  47.   void ResetMandatoryControlPoints();
  48.  
  49. #ifdef PROLOGIO
  50.   void WriteAttributes(wxExpr *clause);
  51.   void ReadAttributes(wxExpr *clause);
  52. #endif
  53.  
  54.   void Copy(wxShape ©);
  55.  
  56.   // Set all region sizes according to proportions and
  57.   // this object total size
  58.   void SetRegionSizes();
  59.  
  60.   // Edit region colours/styles
  61.   void EditRegions();
  62.  
  63.   // Attachment points correspond to regions in the divided box
  64.   bool GetAttachmentPosition(int attachment, double *x, double *y,
  65.                                      int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
  66.   bool AttachmentIsValid(int attachment);
  67.   int GetNumberOfAttachments() const;
  68.  
  69.   // Invoke editor on CTRL-right click
  70.   void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
  71. };
  72.  
  73. #endif
  74.     // _OGL_DIVIDED_H_
  75.  
  76.