Applied patch [ 573644 ] wxDisplay for Mac (again)
Applied patch [ 573172 ] Implements wxDisplay for mac Applied patch [ 573356 ] wxDisplay for MSW Alterations: Put sample in regular samples, not contrib Removed multimon.h for copyright reasons git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
81
include/wx/display.h
Normal file
81
include/wx/display.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: display.h
|
||||
// Purpose: wxDisplay class
|
||||
// Author: Royce Mitchell III
|
||||
// Modified by:
|
||||
// Created: 06/21/02
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWindows team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DISPLAY_H_BASE_
|
||||
#define _WX_DISPLAY_H_BASE_
|
||||
|
||||
#if wxUSE_DISPLAY
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "display.h"
|
||||
#endif
|
||||
|
||||
class wxPoint;
|
||||
class wxRect;
|
||||
class wxString;
|
||||
|
||||
class WXDLLEXPORT wxDisplayBase
|
||||
{
|
||||
public:
|
||||
// initialize the object containing all information about the given
|
||||
// display
|
||||
wxDisplayBase ( size_t index = 0 ) : m_index ( index )
|
||||
{
|
||||
wxASSERT_MSG(m_index < wxDisplayBase::GetCount(), wxT("An invalid index was passed to wxDisplay"));
|
||||
}
|
||||
|
||||
// accessors
|
||||
|
||||
// return the number of available displays, valid parameters to
|
||||
// wxDisplay ctor are from 0 up to this number
|
||||
static size_t GetCount();
|
||||
|
||||
// find the display where the given point lies, return -1 if
|
||||
// it doesn't belong to any display
|
||||
static int GetFromPoint ( const wxPoint& pt );
|
||||
|
||||
virtual wxRect GetGeometry() const = 0;
|
||||
virtual int GetDepth() const = 0;
|
||||
bool IsColour() const { return GetDepth() != 1; }
|
||||
|
||||
// some people never learn to spell ;-)
|
||||
bool IsColor() const { return IsColour(); }
|
||||
|
||||
// name may be empty
|
||||
virtual wxString GetName() const = 0;
|
||||
|
||||
// let display 0 always be the primary display
|
||||
bool IsPrimary() { return m_index == 0; }
|
||||
|
||||
|
||||
virtual ~wxDisplayBase() {}
|
||||
|
||||
protected:
|
||||
size_t m_index; // which display did we select when creating this file?
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxDisplayBase);
|
||||
};
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/display.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/display.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/display.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/display.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/display.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_DISPLAY
|
||||
|
||||
#endif // _WX_DISPLAY_H_BASE_
|
Reference in New Issue
Block a user