cxWidgets 1.0
cxObject.h
Go to the documentation of this file.
1// Copyright (c) 2026 E. Oulashin
2#ifndef __CXOBJECT_H__
3#define __CXOBJECT_H__
4
5// Copyright (c) 2005-2007 Michael H. Kinney
6//
7// This is the base class for everything in
8// the cxWidgets UI framework and contains
9// defaults for some things.
10
11#include <ncurses.h>
12#include <panel.h>
13
14#include <cstdio>
15#include <string>
16#include <iostream>
17#include <sstream>
18#include <vector>
19
20#include "cxColors.h"
21#include "cxKeyDefines.h"
22#include "cxWidgetsException.h" // Included here so that
23 // everything has access to it
24
25namespace cx {
26
27typedef std::vector<std::string> stringContainer;
28typedef std::vector<std::string>::iterator stringContainerIterator;
29
30// Un-comment this line to include some test-only
31// helper functionality in classes where it might
32// be useful.
33#define TESTS
34
41{
42 public:
46 cxObject();
47
51 virtual ~cxObject();
52
57 static bool UseColors() { return useColors; }
58
63 static void UseColors(bool useIt);
64
69 static bool UseBeeps() { return useBeeps; }
70
75 static void UseBeeps(bool useIt) { useBeeps = useIt; }
76
80 virtual void beep();
81
90 virtual std::string cxTypeStr() const;
91
92 protected:
96 static bool useColors;
100 static bool useBeeps;
101};
102
103} // namespace cx
104
105#endif
The base class for windowing classes in the cxWidgets.
Definition cxObject.h:41
virtual ~cxObject()
Definition cxObject.cpp:16
static bool useBeeps
Whether or not to enable beeping.
Definition cxObject.h:100
static bool useColors
Whether or not to use colors.
Definition cxObject.h:96
virtual void beep()
Definition cxObject.cpp:27
static bool UseBeeps()
Definition cxObject.h:69
virtual std::string cxTypeStr() const
Returns the name of the cxWidgets class. This is overridden.
Definition cxObject.cpp:35
static void UseBeeps(bool useIt)
Definition cxObject.h:75
cxObject()
Definition cxObject.cpp:12
static bool UseColors()
Definition cxObject.h:57
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all it...
Definition cxApp.cpp:5
std::vector< std::string >::iterator stringContainerIterator
Definition cxObject.h:28
std::vector< std::string > stringContainer
Definition cxObject.h:27