GNU Octave
9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
display.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2009-2024 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_display_h)
27
#define octave_display_h 1
28
29
#include "octave-config.h"
30
31
#include <string>
32
33
class
Matrix
;
34
35
OCTAVE_BEGIN_NAMESPACE
(
octave
)
36
37
class
display_info
38
{
39
public
:
40
41
// Create object with default values. To be useful, you must call
42
// initialize to find the actual system parameters for the given
43
// display.
44
45
display_info
()
46
: m_rx (72), m_ry (72), m_ht (1), m_wd (1), m_dp (0),
47
m_dpy_avail (false), m_msg ()
48
{ }
49
50
~display_info
() =
default
;
51
52
display_info
(
const
display_info
&) =
default
;
53
54
display_info
&
operator =
(
const
display_info
&) =
default
;
55
56
void
initialize ();
57
58
double
x_dpi
()
const
{
return
m_rx; }
59
60
double
y_dpi
()
const
{
return
m_ry; }
61
62
int
height
()
const
{
return
m_ht; }
63
64
int
width
()
const
{
return
m_wd; }
65
66
int
depth
()
const
{
return
m_dp; }
67
68
bool
display_available
()
const
{
return
m_dpy_avail; }
69
70
std::string
message
()
const
{
return
m_msg; }
71
72
private
:
73
74
// X- and Y- Resolution of the display in dots (pixels) per inch.
75
double
m_rx;
76
double
m_ry;
77
78
// Height, width, and depth of the display.
79
int
m_ht;
80
int
m_wd;
81
int
m_dp;
82
83
bool
m_dpy_avail;
84
85
// Message associated with any initiailization failure. Set if
86
// m_dpy_avail is false.
87
std::string m_msg;
88
};
89
90
OCTAVE_END_NAMESPACE(
octave
)
91
92
#endif
Matrix
Definition:
dMatrix.h:42
Matrix::operator=
Matrix & operator=(const Matrix &a)=default
display_info
Definition:
display.h:38
display_info::display_info
display_info()
Definition:
display.h:45
display_info::display_available
bool display_available() const
Definition:
display.h:68
display_info::depth
int depth() const
Definition:
display.h:66
display_info::~display_info
~display_info()=default
display_info::display_info
display_info(const display_info &)=default
display_info::width
int width() const
Definition:
display.h:64
display_info::x_dpi
double x_dpi() const
Definition:
display.h:58
display_info::message
std::string message() const
Definition:
display.h:70
display_info::height
int height() const
Definition:
display.h:62
display_info::y_dpi
double y_dpi() const
Definition:
display.h:60
OCTAVE_BEGIN_NAMESPACE
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
octave
Definition:
file-ops.cc:60
libinterp
corefcn
display.h
Generated on Sun Mar 17 2024 22:36:43 for GNU Octave by
1.9.1