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:
Julian Smart
2002-07-19 20:42:34 +00:00
parent 377a219ac7
commit a536e41102
9 changed files with 832 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////////////////
// Name: multimon_test.cpp
// Purpose: tests wxDisplay class
// Author: Royce Mitchell III
// Modified by:
// Created: 06/21/02
// RCS-ID: $Id$
// Copyright: (c) wxWindows team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <wx/wx.h>
#define wxUSE_DISPLAY 1
#include <wx/display.h>
class TestApp : public wxApp
{
bool OnInit();
};
DECLARE_APP(TestApp)
IMPLEMENT_APP(TestApp)
bool TestApp::OnInit()
{
size_t count = wxDisplay::GetCount();
wxLogDebug ( "I detected %i display(s) on your system", count );
size_t i = 0;
while ( i < count )
{
wxDisplay display ( i );
wxRect r = display.GetGeometry();
wxLogDebug ( "Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits",
i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(),
display.GetDepth() );
i++;
}
return FALSE;
}