2000-03-03 06:25:10 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: divided.h
|
|
|
|
// Purpose: wxDividedShape
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 12/07/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _OGL_DIVIDED_H_
|
|
|
|
#define _OGL_DIVIDED_H_
|
|
|
|
|
2002-09-07 08:28:46 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2003-07-25 17:20:57 -04:00
|
|
|
#pragma interface "divided.h"
|
2000-03-03 06:25:10 -05:00
|
|
|
#endif
|
|
|
|
|
2003-07-25 17:20:57 -04:00
|
|
|
|
2000-03-03 06:25:10 -05:00
|
|
|
/*
|
|
|
|
* Definition of a region
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Box divided into horizontal regions
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern wxFont *g_oglNormalFont;
|
2003-07-25 17:20:57 -04:00
|
|
|
class WXDLLIMPEXP_OGL wxDividedShape: public wxRectangleShape
|
2000-03-03 06:25:10 -05:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxDividedShape)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxDividedShape(double w = 0.0, double h = 0.0);
|
|
|
|
~wxDividedShape();
|
|
|
|
|
|
|
|
void OnDraw(wxDC& dc);
|
|
|
|
void OnDrawContents(wxDC& dc);
|
|
|
|
|
|
|
|
void SetSize(double w, double h, bool recursive = TRUE);
|
|
|
|
|
|
|
|
void MakeControlPoints();
|
|
|
|
void ResetControlPoints();
|
|
|
|
|
|
|
|
void MakeMandatoryControlPoints();
|
|
|
|
void ResetMandatoryControlPoints();
|
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
#if wxUSE_PROLOGIO
|
2000-03-03 06:25:10 -05:00
|
|
|
void WriteAttributes(wxExpr *clause);
|
|
|
|
void ReadAttributes(wxExpr *clause);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void Copy(wxShape ©);
|
|
|
|
|
|
|
|
// Set all region sizes according to proportions and
|
|
|
|
// this object total size
|
|
|
|
void SetRegionSizes();
|
|
|
|
|
|
|
|
// Edit region colours/styles
|
|
|
|
void EditRegions();
|
|
|
|
|
|
|
|
// Attachment points correspond to regions in the divided box
|
|
|
|
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
|
|
|
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
2003-04-04 08:13:46 -05:00
|
|
|
bool AttachmentIsValid(int attachment) const;
|
2000-03-03 06:25:10 -05:00
|
|
|
int GetNumberOfAttachments() const;
|
|
|
|
|
|
|
|
// Invoke editor on CTRL-right click
|
|
|
|
void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _OGL_DIVIDED_H_
|
|
|
|
|