multiple display monitors support

Added a new class screen
This commit is contained in:
cnjinhao
2015-01-02 13:25:46 +08:00
parent aa12254844
commit b827e0aa82
14 changed files with 94 additions and 99 deletions

View File

@@ -378,8 +378,9 @@ namespace nana
struct size
{
using value_type = unsigned;
size();
size(unsigned width, unsigned height);
size(value_type width, value_type height);
size(const rectangle&);
size& operator=(const rectangle&);
@@ -390,8 +391,8 @@ namespace nana
bool operator!=(const size& rhs) const;
size operator+(const size&) const;
unsigned width;
unsigned height;
value_type width;
value_type height;
};
struct rectangle

View File

@@ -1,6 +1,7 @@
/*
* Platform Implementation
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -33,7 +34,7 @@ namespace detail
unsigned extra_height; //extra border size, it is useful in Windows, ignore in X11 always 0
};
static nana::size screen_size();
static nana::size primary_monitor_size();
static rectangle screen_area_from_point(const point&);
static window_result create_window(native_window_type, bool nested, const rectangle&, const appearance&);
static native_window_type create_child_window(native_window_type, const rectangle&);

View File

@@ -87,8 +87,6 @@ namespace API
bool register_shortkey(window, unsigned long);
void unregister_shortkey(window);
nana::size screen_size();
rectangle screen_area_from_point(const point&);
nana::point cursor_position();
rectangle make_center(unsigned width, unsigned height); ///< Retrieves a rectangle which is in the center of the screen.
rectangle make_center(window, unsigned width, unsigned height); ///< Retrieves a rectangle which is in the center of the window

View File

@@ -1,6 +1,7 @@
/*
* Nana GUI Library Definition
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -15,6 +16,7 @@
#define NANA_GUI_WVL_HPP
#include "programming_interface.hpp"
#include "screen.hpp"
#include "widgets/form.hpp"
#include "drawing.hpp"
#include "msgbox.hpp"