* Use varargs in Canvas::print.

* Added min/max size to display::Window. Added flags for windows that
should be on located at the left/bottom side of a Frame.

* Reversed print order in WindowLog*.

* Added display::TextElement and subclasses for flexible printing to a
char buffer with associated attributes. Added display::Attributes and
display::Canvas::print_attributes.

* Added display::WindowText for use with display::TextElement's.

* Added ui::ElementMenu for generic menus, and started work adding
this to ui::Download.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@751 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-08-06 18:20:56 +00:00
parent 62beb9d9ed
commit 0b45062eb3
66 changed files with 1350 additions and 256 deletions
+24 -7
View File
@@ -56,12 +56,17 @@ public:
typedef rak::mem_fun1<Manager, void, Window*> SlotWindow;
typedef rak::mem_fun2<Manager, void, Window*, rak::timer> SlotTimer;
static const int flag_active = (1 << 0);
static const int flag_offscreen = (1 << 1);
static const int flag_width_dynamic = (1 << 2);
static const int flag_height_dynamic = (1 << 3);
static const int flag_active = (1 << 0);
static const int flag_offscreen = (1 << 1);
static const int flag_left = (1 << 2);
static const int flag_bottom = (1 << 3);
Window(Canvas* canvas, int flags, extent_type minWidth, extent_type minHeight);
static const extent_type extent_static = extent_type();
static const extent_type extent_full = ~extent_type();
Window(Canvas* canvas, int flags,
extent_type minWidth, extent_type minHeight,
extent_type maxWidth, extent_type maxHeight);
virtual ~Window();
@@ -71,8 +76,14 @@ public:
bool is_offscreen() const { return m_flags & flag_offscreen; }
void set_offscreen(bool state) { if (state) m_flags |= flag_offscreen; else m_flags &= ~flag_offscreen; }
bool is_width_dynamic() const { return m_flags & flag_width_dynamic; }
bool is_height_dynamic() const { return m_flags & flag_height_dynamic; }
bool is_left() const { return m_flags & flag_left; }
void set_left(bool state) { if (state) m_flags |= flag_left; else m_flags &= ~flag_left; }
bool is_bottom() const { return m_flags & flag_bottom; }
void set_bottom(bool state) { if (state) m_flags |= flag_bottom; else m_flags &= ~flag_bottom; }
bool is_width_dynamic() const { return m_maxWidth > m_minWidth; }
bool is_height_dynamic() const { return m_maxHeight > m_minHeight; }
bool is_dirty() { return m_taskUpdate.is_queued(); }
void mark_dirty() { m_slotSchedule(this, cachedTime + 1); }
@@ -80,6 +91,9 @@ public:
extent_type min_width() const { return m_minWidth; }
extent_type min_height() const { return m_minHeight; }
extent_type max_width() const { return std::max(m_maxWidth, m_minWidth); }
extent_type max_height() const { return std::max(m_maxHeight, m_minHeight); }
extent_type width() const { return m_canvas->width(); }
extent_type height() const { return m_canvas->height(); }
@@ -110,6 +124,9 @@ protected:
extent_type m_minWidth;
extent_type m_minHeight;
extent_type m_maxWidth;
extent_type m_maxHeight;
rak::priority_item m_taskUpdate;
};