X
xargon
Hi everyone,
I am writing a small user interface library in C++ (I know it has been
done to death, but it is good for learning ).
Anyways, I need some help/advice with the deisgn of the software
architecture. The problem I am facing is that a control can have so
many states... For example, a button could be have various shapes
(rounded, square, some other custom geometry). Also, it could be
bitmapped, textured, text only, text with bitmap etc. So, you get the
picture. Having a specialized Button class for each of these would be
very difficult to maintain.
So, my question to you gurus is how would you organize a widget library
like that. What design patterns would you recommend that I look into?
Any advice would be appreciated.
Thanks and cheers!
xargy
I am writing a small user interface library in C++ (I know it has been
done to death, but it is good for learning ).
Anyways, I need some help/advice with the deisgn of the software
architecture. The problem I am facing is that a control can have so
many states... For example, a button could be have various shapes
(rounded, square, some other custom geometry). Also, it could be
bitmapped, textured, text only, text with bitmap etc. So, you get the
picture. Having a specialized Button class for each of these would be
very difficult to maintain.
So, my question to you gurus is how would you organize a widget library
like that. What design patterns would you recommend that I look into?
Any advice would be appreciated.
Thanks and cheers!
xargy