PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
validator/PlatformCanvas.h
Go to the documentation of this file.
1//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3// Name: platforms/validator/PlatformCanvas.h
4// Purpose: Validator Platform Canvas (no pixel buffer stub)
5// Author: Shane T. Mueller, Ph.D.
6// Copyright: (c) 2025 Shane T. Mueller <smueller@obereed.net>
7// License: GPL 2
8//
9// This file is part of the PEBL project.
10//
11// PEBL is free software; you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation; either version 2 of the License, or
14// (at your option) any later version.
15//
16// PEBL is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with PEBL; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25#ifndef __VALIDATOR_PLATFORMCANVAS_H__
26#define __VALIDATOR_PLATFORMCANVAS_H__
27
28#include "PlatformWidget.h"
29#include "../../objects/PCanvas.h"
30
32class PlatformCanvas : virtual public PlatformWidget, virtual public PCanvas {
33public:
34 PlatformCanvas(int width, int height);
35 PlatformCanvas(int width, int height, Variant color);
36 virtual ~PlatformCanvas();
37
38 virtual bool Draw();
39 virtual std::string ObjectName() const { return "PlatformCanvas (validator)"; }
40
41 // Resolve ambiguity by explicitly delegating to PCanvas
42 virtual bool SetProperty(std::string name, Variant v) {
43 return PCanvas::SetProperty(name, v);
44 }
45 virtual ObjectValidationError ValidateProperty(std::string name, Variant v) const {
46 return PCanvas::ValidateProperty(name, v);
47 }
48 virtual ObjectValidationError ValidateProperty(std::string name) const {
49 return PCanvas::ValidateProperty(name);
50 }
51
52protected:
53 virtual std::ostream& SendToStream(std::ostream& out) const;
54};
55
56#endif
ObjectValidationError
Definition PEBLObject.h:37
This class is the basic generic text box.
Definition PCanvas.h:39
virtual bool SetProperty(std::string, Variant v)
Definition PCanvas.cpp:84
virtual ObjectValidationError ValidateProperty(std::string, Variant v) const
Definition PCanvas.cpp:128
Validator platform canvas - no pixel buffer, used only for compilation.
virtual bool SetProperty(std::string name, Variant v)
virtual std::string ObjectName() const
PlatformCanvas(int width, int height)
PlatformCanvas(int width, int height, Variant color)
virtual ObjectValidationError ValidateProperty(std::string name, Variant v) const
virtual ~PlatformCanvas()
virtual ObjectValidationError ValidateProperty(std::string name) const
virtual std::ostream & SendToStream(std::ostream &out) const
An inheritable printing class used by PEBLObjectBase::operator<<.
virtual bool Draw()
This method initiates everything needed to display the main window