31 #ifndef Pt_Forms_Style_h
32 #define Pt_Forms_Style_h
34 #include <Pt/Forms/Api.h>
35 #include <Pt/Forms/Alignment.h>
36 #include <Pt/Forms/Direction.h>
37 #include <Pt/Forms/Spacing.h>
38 #include <Pt/Forms/StyleOptions.h>
39 #include <Pt/Forms/PaintSurface.h>
40 #include <Pt/Gfx/Color.h>
41 #include <Pt/Gfx/Brush.h>
42 #include <Pt/Gfx/Pen.h>
43 #include <Pt/Gfx/Rect.h>
44 #include <Pt/Gfx/Font.h>
45 #include <Pt/Gfx/FontMetrics.h>
46 #include <Pt/Gfx/TextMetrics.h>
47 #include <Pt/TypeInfo.h>
48 #include <Pt/NonCopyable.h>
49 #include <Pt/SmartPtr.h>
73 FacetPtr(T* facet = 0)
80 FacetPtr(
const FacetPtr& ptr)
91 if( 0 == _facet->unref() )
96 FacetPtr& operator=(
const FacetPtr& ptr)
103 if( 0 == _facet->unref() )
114 void reset(T* facet = 0)
121 if( 0 == _facet->unref() )
130 T* operator->()
const
136 bool operator! ()
const
137 {
return _facet == 0; }
139 operator bool ()
const
140 {
return _facet != 0; }
160 explicit Facet(
const std::type_info& ti, std::size_t refs = 0)
168 const std::type_info& typeId()
const
198 const std::type_info* _typeId;
242 template <
typename FacetT>
245 Facet* facet = find(
typeid(FacetT) );
246 return static_cast<FacetT*
>(facet);
250 Facet* find(
const std::type_info& ti)
const;
253 typedef std::map<TypeInfo, Facet*> FacetMap;
255 std::size_t _generation;
Core module.
Definition: Allocator.h:33
Protects derived classes from being copied.
Definition: NonCopyable.h:54