What would need to do is create an abstraction of all your drawing operations, and parametrize the look. As you said this is quite a challenge as there are a lot of drawing operations in every gui that have semantics and depending how context specific you want to be and should therefore be parametrized. This can turn into quite a list (e.g. do you want to be able to style the way your combo-box draws its arrow, or how the bar of a scrollbar is drawn). If you are looking for examples QT supports styling the UI via CSS stylesheets and programmatically by creating a new paint class.
CSS is probably also a good example of what a basic set of styleable properties needs to look like.
But here is a very simple example in pseudo code
class Window
{
Style borderStyle;
ScreenRectangle rect;
paint(StyledPainter painter)
{
painter.drawBorder(borderStyle,rect);
...
}
}
class Style
{
float lineWidth;
RGB color;
}
class StylePainter
{
DrawContext context;
drawBorder(Style borderStyle, ScreenRectangle rect)
{
context.setLineWidth(style.linewidth);
context.setColor(style.color);
context.drawRect(rect);
}
}