ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
console.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_system of the \aliblong.
4///
5/// Copyright 2013-2026 A-Worx GmbH, Germany.
6/// Published under #"mainpage_license".
7//==================================================================================================
8ALIB_EXPORT namespace alib { namespace system {
9
10//==================================================================================================
11/// This class provides system-dependent features in respect the console attached to a process.
12//==================================================================================================
13class Console {
14 protected:
15 /// Console text width.
16 ALIB_DLL static
18
19 public:
20 /// Tries to detect the current width of the console. Returns \c 0 in case of failure.
21 /// @param forceRedetect If \c true, the console size is tried to be detected, even if it
22 /// had been done before (and even if it failed before).<br>
23 /// Defaults to \c false.
24 /// @param defaultWidth The default value, in case the detection fails or the detected
25 /// value is \c 0.<br>
26 /// Defaults to \c 80.
27 ///
28 /// @return The console width.
29 ALIB_DLL static
30 int GetWidth( bool forceRedetect = false, int defaultWidth= 80 );
31};
32
33} // namespace alib[::system]
34
35/// Type alias in namespace #"%alib".
37
38} // namespace [alib]
#define ALIB_DLL
#define ALIB_EXPORT
This class provides system-dependent features in respect the console attached to a process.
Definition console.hpp:13
static int GetWidth(bool forceRedetect=false, int defaultWidth=80)
Definition console.cpp:7
static int lastReceivedWidth
Console text width.
Definition console.hpp:17
Definition alox.cpp:14
system::Console Console
Type alias in namespace #"%alib".
Definition console.hpp:36