PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PImageBox.h
Go to the documentation of this file.
1//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3// Name: src/objects/PImageBox.h
4// Purpose: Contains generic specs for an ImageBox class
5// Author: Shane T. Mueller, Ph.D.
6// Copyright: (c) 2003-2026 Shane T. Mueller <smueller@obereed.net>
7// License: GPL 2
8//
9//
10//
11// This file is part of the PEBL project.
12//
13// PEBL is free software; you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation; either version 2 of the License, or
16// (at your option) any later version.
17//
18// PEBL is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with PEBL; if not, write to the Free Software
25// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27#ifndef __PIMAGEBOX_H__
28#define __PIMAGEBOX_H__
29
30
31#include "PWidget.h"
32#include <string>
33
37
38
39class PImageBox: virtual public PWidget
40{
41public:
42
43 PImageBox();
44 virtual ~PImageBox(){};
45
46
47
48 //overloaded generic PEBLObjectBase methods
49 virtual bool SetProperty(std::string, Variant v);
50 virtual Variant GetProperty(std::string)const;
51 virtual ObjectValidationError ValidateProperty(std::string, Variant v)const;
52 virtual ObjectValidationError ValidateProperty(std::string)const;
53
54
57 virtual bool LoadImage(const std::string & imagefilename)=0;
58
59 virtual void SetPosition(pInt x, pInt y);
60 virtual void SetSize(int width, int height);
61
62 virtual std::string ObjectName() const{return "PImageBox";};
63
64protected:
65
66 //These are inherited by child PlatformImageBox class.
67
68 virtual std::ostream & SendToStream(std::ostream& out) const {return out;};
69
70
71private:
72 void __SetProps__();
73};
74
75
76
77#endif
#define pInt
Definition Defs.h:8
ObjectValidationError
Definition PEBLObject.h:37
virtual void SetSize(int width, int height)
Definition PImageBox.cpp:61
virtual ObjectValidationError ValidateProperty(std::string, Variant v) const
virtual std::ostream & SendToStream(std::ostream &out) const
An inheritable printing class used by PEBLObjectBase::operator<<.
Definition PImageBox.h:68
virtual void SetPosition(pInt x, pInt y)
Definition PImageBox.cpp:44
virtual std::string ObjectName() const
Definition PImageBox.h:62
virtual Variant GetProperty(std::string) const
virtual bool LoadImage(const std::string &imagefilename)=0
virtual bool SetProperty(std::string, Variant v)
Definition PImageBox.cpp:79
virtual ~PImageBox()
Definition PImageBox.h:44