tbx  0.7.3
showfullobject.h
1 /*
2  * tbx RISC OS toolbox library
3  *
4  * Copyright (C) 2010-2012 Alan Buckley All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 
25 #ifndef SHOWFULLOBJECT_H_
26 #define SHOWFULLOBJECT_H_
27 
28 #include "showpointobject.h"
29 #include "showfullspec.h"
30 
31 namespace tbx {
32 namespace res {
33  class ResObject;
34 }
41 {
42 public:
61  ShowFullObject(const Object &other) : ShowPointObject(other) {}
68  ShowFullObject(const std::string &template_name) : ShowPointObject(template_name) {}
76  ShowFullObject(const res::ResObject &object_template) : ShowPointObject(object_template) {}
77 
79 
80  void show(const ShowFullSpec &full_spec);
81  void show(const ShowFullSpec &full_spec, const Object &parent);
82  void show(const ShowFullSpec &full_spec, const Component &parent);
83 
85 
87 };
88 
89 }
90 
91 #endif /* SHOWFULLOBJECT_H_ */
ShowFullObject(ObjectId handle)
Construct from a Toolbox object id.
Definition: showfullobject.h:55
ShowFullObject()
Constructor with no reference to a Toolbox object.
Definition: showfullobject.h:49
void show_as_submenu(const MenuItem &parent)
Show object as a sub menu from the given menu item.
Definition: showpointobject.cc:187
Structure used to specify exact position and size for an object derived from tbx::ShowFullObject.
Definition: showfullspec.h:45
void show_as_menu()
Show object as a menu at default position.
Definition: showpointobject.cc:102
Base class for components in an object.
Definition: component.h:42
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
void show()
Show the object at the default place.
Definition: object.cc:240
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
Object that can be shown at a specific position as well as its default place.
Definition: showpointobject.h:42
Base class for a resource object that can be edited.
Definition: resobject.h:52
ShowFullObject(const res::ResObject &object_template)
Create Toolbox object from a memory template and make this object a reference to it.
Definition: showfullobject.h:76
ShowFullObject(const std::string &template_name)
Create a Toolbox object and make this object a reference to it.
Definition: showfullobject.h:68
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
ShowFullObject(const Object &other)
Construct as reference to another Toolbox object.
Definition: showfullobject.h:61
Class to manipulate a toolbox object.
Definition: object.h:50