* UI refactoring, added display::Frame and started cleaning up the

code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@747 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-07-26 21:41:09 +00:00
parent ef90f0f51e
commit fc76a11d71
41 changed files with 889 additions and 471 deletions
+15 -6
View File
@@ -37,23 +37,32 @@
#ifndef RTORRENT_UI_ELEMENT_BASE_H
#define RTORRENT_UI_ELEMENT_BASE_H
#include "display/manager.h"
#include "input/bindings.h"
namespace display {
class Frame;
class Window;
}
namespace ui {
class ElementBase {
public:
typedef display::Manager::iterator MItr;
ElementBase() : m_frame(NULL) {}
virtual ~ElementBase() {}
virtual void activate(Control* c, MItr mItr) = 0;
virtual void disable(Control* c) = 0;
bool is_active() const { return m_frame != NULL; }
input::Bindings& get_bindings() { return m_bindings; }
input::Bindings& bindings() { return m_bindings; }
virtual void activate(display::Frame* frame) = 0;
virtual void disable() = 0;
virtual display::Window* window() = 0;
protected:
display::Frame* m_frame;
input::Bindings m_bindings;
};