/////////////////////////////////////////////////////////////////////////////
-// Name: window.h
+// Name: wx/mac/carbon/window.h
// Purpose: wxWindowMac class
// Author: Stefan Csomor
// Modified by:
#ifndef _WX_WINDOW_H_
#define _WX_WINDOW_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "window.h"
-#endif
-
#include "wx/brush.h"
// ---------------------------------------------------------------------------
class WXDLLEXPORT wxWindowMac: public wxWindowBase
{
DECLARE_DYNAMIC_CLASS(wxWindowMac)
-
+
friend class wxDC;
friend class wxPaintDC;
-
+
public:
-
+
wxWindowMac()
: m_macBackgroundBrush()
, m_macVisibleRegion()
// implement base class pure virtuals
- virtual void SetTitle( const wxString& title);
- virtual wxString GetTitle() const;
+ virtual void SetLabel( const wxString& title);
+ virtual wxString GetLabel() const;
virtual void Raise();
virtual void Lower();
- virtual bool Show( bool show = TRUE );
- virtual bool Enable( bool enable = TRUE );
+ virtual bool Show( bool show = true );
+ virtual bool Enable( bool enable = true );
virtual void SetFocus();
virtual void WarpPointer(int x, int y);
- virtual void Refresh( bool eraseBackground = TRUE,
+ virtual void Refresh( bool eraseBackground = true,
const wxRect *rect = (const wxRect *) NULL );
virtual bool SetCursor( const wxCursor &cursor );
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
- int range, bool refresh = TRUE );
- virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
+ int range, bool refresh = true );
+ virtual void SetScrollPos( int orient, int pos, bool refresh = true );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
void MacRootWindowToClient( int *x , int *y ) const ;
void MacWindowToRootWindow( int *x , int *y ) const ;
void MacRootWindowToWindow( int *x , int *y ) const ;
-
+
virtual wxString MacGetToolTipString( wxPoint &where ) ;
// simple accessors
virtual WXWidget GetHandle() const { return (WXWidget) NULL ; }
bool GetTransparentBackground() const { return m_backgroundTransparent; }
- void SetTransparent(bool t = TRUE) { m_backgroundTransparent = t; }
+ void SetTransparent(bool t = true) { m_backgroundTransparent = t; }
// event handlers
// --------------
void OnMouseEvent( wxMouseEvent &event ) ;
void MacOnScroll(wxScrollEvent&event ) ;
-
+
bool AcceptsFocus() const ;
public:
virtual wxPoint GetClientAreaOrigin() const;
wxWindowMac *FindItem(long id) const;
- wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
+ wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
- // Make a Windows extended style from the given wxWindows window style
+ // Make a Windows extended style from the given wxWidgets window style
static WXDWORD MakeExtendedStyle(long style,
- bool eliminateBorders = TRUE);
+ bool eliminateBorders = true);
// Determine whether 3D effects are wanted
WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) const;
- // MSW only: TRUE if this control is part of the main control
- virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
+ // MSW only: true if this control is part of the main control
+ virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; };
// Setup background and foreground colours correctly
virtual void SetupColours();
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;
virtual void MacRedraw( WXHRGN updatergn , long time , bool erase) ;
virtual bool MacCanFocus() const { return true ; }
-
+
virtual bool MacDispatchMouseEvent(wxMouseEvent& event ) ;
// this should not be overriden in classes above wxWindowMac because it is called from its destructor via DeleteChildren
virtual void RemoveChild( wxWindowBase *child );
virtual void MacPaintBorders( int left , int top ) ;
WXWindow MacGetRootWindow() const ;
wxTopLevelWindowMac* MacGetTopLevelWindow() const ;
-
+
virtual WXWidget MacGetContainerForEmbedding() ;
-
+
virtual long MacGetLeftBorderSize() const ;
virtual long MacGetRightBorderSize() const ;
virtual long MacGetTopBorderSize() const ;
virtual long MacGetBottomBorderSize() const ;
-
+
static long MacRemoveBordersFromStyle( long style ) ;
virtual void MacSuperChangedPosition() ;
// the absolute coordinates of this item within the toplevel window may have changed
// for compatibility
void MacUpdateImmediately() { Update() ; }
virtual bool MacSetupCursor( const wxPoint& pt ) ;
-
+
// virtual bool MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindowMac* rootwin ) ;
// virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) ;
// virtual void MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin) ;
int m_y ;
int m_width ;
int m_height ;
-
+
wxScrollBar* m_hScrollBar ;
wxScrollBar* m_vScrollBar ;
wxString m_label ;
-
+
void MacCreateScrollBars( long style ) ;
void MacRepositionScrollBars() ;