Home » U++ Library support » Look and Chameleon Technology » Global style changes using Chameleon...
Re: Global style changes using Chameleon... [message #15252 is a reply to message #15251] |
Fri, 11 April 2008 18:31   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
One more thing. These functions are useful for setting ctrl looks:
template <class T>
void ImageLook(Value *look, int i, int n = 4)
{
while(n--)
*look++ = T::Get(i++);
}
template <class T>
void ImageLook(Value *look, int i, const Image& image, const Color *color, int n = 4)
{
for(int q = 0; q < n; q++)
*look++ = ChLookWith(T::Get(i++), image, *color++);
}
template <class T>
void ImageLook(Value *look, int i, const Image& image, int n = 4)
{
for(int q = 0; q < n; q++)
*look++ = ChLookWith(T::Get(i++), image, *color++);
}
These are templated equivalents to CtrlsImageLook used in uppsrc. Example usage (sets button style to classic):
Button::Style &s = Button::StyleNormal().Write();
ImageLook<ClassicCtrlsImg>(s.look, ClassicCtrlsImg::I_B);
|
|
|
Goto Forum:
Current Time: Tue Jun 10 07:46:14 CEST 2025
Total time taken to generate the page: 0.04020 seconds
|