Originally Posted by
laserlight
That's true, and I suppose that Joel Spolsky's "law of leaky abstractions" applies to GUI frameworks, so someone serious about GUI programming might have to learn the underlying API anyway.
Obviously, you can HIDE a lot of the flexibility to make a simple-to-use framework - and if you use C++, you can perhaps also make intermediate and advanced forms of the classes that are more flexible [and thus require a bit more effort].
Making a class that produces a text-based window that has the following structure would make widnows real easy to use:
Code:
class TextWindow: public WindowBase
{
public:
virtual void Open(string windowTitle);
virtual void Close();
virtual void AddText(int x, int y, string text);
virtual string GetText(int x, int y, string text, int len);
...
}
But you'd struggle if you also want to have add graphical elements to that basic class, or use different close/minimize/maximize buttons or some such.
--
Mats