00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
#ifndef USTYLEHINTS_HPP
00029 
#define USTYLEHINTS_HPP
00030 
00031 
#include "../uobject.hpp"
00032 
00033 
#include "../uicon.hpp"
00034 
#include "../udrawable.hpp"
00035 
00036 
#include "../font/ufont.hpp"
00037 
00038 
#include "../util/udimension.hpp"
00039 
#include "../util/uinsets.hpp"
00040 
#include "../util/upalette.hpp"
00041 
00042 
namespace ufo {
00043 
00044 
class UBorderModel;
00045 
00052 class UFO_EXPORT UStyleHints {
00053 
public:
00054     
enum StyleHint {
00055         MinimumSizeHint,
00056         MaximumSizeHint,
00057         PreferredSizeHint,
00058         BorderHint,
00059         MarginHint,
00060         HAlignmentHint,
00061         VAlignmentHint,
00062         DirectionHint,
00063         OrientationHint,
00064         FontHint,
00065         PaletteHint,
00066         OpacityHint,
00067         BackgroundHint,
00068         IconHint,
00069         AllHints
00070     };
00071 
public:
00072     UStyleHints();
00073     ~UStyleHints();
00079     
void transcribe(UStyleHints * hints);
00085     
void update(UStyleHints * hints);
00086 
00087     UStyleHints * clone() 
const;
00088 
00089     
friend std::ostream & operator<<(std::ostream & os, 
const UStyleHints * hints);
00090 
public:
00091     
UDimension minimumSize;
00092     
UDimension maximumSize;
00093     
UDimension preferredSize;
00094 
00096     UBorderModel * border;
00098     UInsets margin;
00099 
00100     
00101     Alignment hAlignment : 4;
00102     Alignment vAlignment : 4;
00103     Direction direction : 4;
00104     Orientation orientation : 4;
00105 
00107     UFont font;
00108 
00109     
UPalette palette;
00110 
00111     
float opacity;
00112 
00113     
UDrawable * background;
00114     
UIcon * icon;
00115 };
00116 
00117 
extern std::ostream &
00118 operator<<(std::ostream & os, 
const UStyleHints * hints);
00119 
00120 
00121 } 
00122 
00123 
#endif // USTYLEHINTS_HPP