22SizeOfReBarBandInfo(REBARBANDINFO& info)
24 info.cbSize =
sizeof(REBARBANDINFO);
34 TControl(parent, id,
_T(
""), x, y, w, h, module),
46 Attr.Style = WS_VISIBLE|WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|
47 CCS_NODIVIDER|CCS_NOPARENTALIGN|
57 TControl(parent, resourceId, module),
115 ModifyStyle(0,CCS_NODIVIDER|CCS_NOPARENTALIGN|RBS_VARHEIGHT|RBS_BANDBORDERS|WS_BORDER);
125 Info.fMask &= ~RBIM_IMAGELIST;
146 for(
int i = 0; i < static_cast<int>(
FBands->
Size()); i++){
148 (*FBands)[i]->SetupData(
this, info);
165 if(index ==
static_cast<uint>(-1))
171 (*FBands)[idx]->SetupData(
this, info);
218 Info.fMask &= ~RBIM_IMAGELIST;
278 Info.fMask &= ~RBIM_IMAGELIST;
357 Parent->HandleMessage(WM_NOTIFY,
GetId(),
reinterpret_cast<TParam2>(¬ify));
446 memset(&info, 0,
sizeof(REBARBANDINFO));
447 SizeOfReBarBandInfo(info);
455 if(!
Child()->GetHandle())
457 info.fMask |= RBBIM_CHILD;
458 info.hwndChild =
Child()->GetHandle();
461 info.fMask |= RBBIM_BACKGROUND;
462 info.hbmBack =
Bitmap->GetHandle();
465 info.fMask |= RBBIM_COLORS;
469 info.fMask |= RBBIM_COLORS;
473 info.fMask |= RBBIM_STYLE;
477 info.fMask |= RBBIM_SIZE;
481 info.fMask |= RBBIM_CHILDSIZE;
482 info.cxMinChild =
MinSize().cx;
483 info.cyMinChild =
MinSize().cy;
486 info.fMask |= RBBIM_ID;
490 info.fMask |= RBBIM_IMAGE;
494 info.fMask |= RBBIM_TEXT;
496 info.cch =
static_cast<UINT
>(
Text().length());
Class wrapper for management of color values.
static const TColor None
not-a-color
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
TProperty< uint > Width
Width of the band: don't use -1.
TObjProperty< TBitmap > Bitmap
The band's background bitmap.
TObjProperty< TColor > FgColor
Band colors -.
TProperty< TWindow * > Child
Handle of the band's child window.
TProperty< int > Id
The band's ID number: don't use -1.
void SetupData(TCoolBar *parent, REBARBANDINFO &info)
TObjProperty< TSize > MinSize
Minimum size of the band's child window don't use TSize(-1,-1).
TProperty< uint > Style
Band style flags.
TObjProperty< tstring > Text
Band text label.
TProperty< uint > Mask
Mask indicating which other members are valid.
TProperty< int > ImageIndex
Band image index (into rebar image list): don't use -1.
TObjProperty< TColor > BgColor
void SetBgColor(const TColor &clr)
bool Insert(TCoolBand *band, uint index=-1)
bool GetInfo(TRebarInfo &info)
void SetPalette(TPalette *palette)
TFuncPropertyVarPut< TPalette * > Palette
void SetTextColor(const TColor &clr)
TFuncProperty< bool > Unicode
void SetBuddy(TWindow *buddy)
TColorScheme & GetColorScheme()
void SetImageList(TImageList *list, TAutoDelete=AutoDelete)
TFuncObjPropertyGet< TCoolBandArray > Bands
TFuncObjProperty< TColorScheme > ColorScheme
TFuncObjProperty< TColor > TextColor
void SetUnicode(bool unicode)
bool Delete(uint index=0)
void SetColorScheme(const TColorScheme &clr)
bool SetInfo(TRebarInfo &info)
void SetTooltip(TTooltip *tip)
TColorScheme * FColorScheme
TCoolBandArray & GetBands()
TCoolBar(TWindow *parent, int id, int x, int y, int w, int h, TModule *module=0)
virtual auto GetWindowClassName() -> owl::TWindowClassName
TFuncPropertyVarPut< TTooltip * > Tooltip
TFuncObjProperty< TColor > BgColor
TFuncPropertyVarPut< TWindow * > Buddy
"Parent" for notification messages
TImageList is a wrapper class for the ImageList common "control".
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TNotify is a thin wrapper around the NMHDR structure.
TPalette is the GDI Palette class derived from TGdiObject.
HPALETTE GetHandle() const
Returns the handle of the palette.
void SetImageList(HIMAGELIST Images)
TRect is a mathematical class derived from tagRect.
int Height() const
Returns the height of this rectangle (bottom - top).
int Width() const
Returns the width of this rectangle (right - left).
TSize()
Default constructor that does nothing.
void AddAt(R t, uint index)
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
virtual void SetParent(TWindow *newParent)
Sets the parent for the specified window by setting Parent to the specified new Parent window object.
bool SetWindowPos(HWND hWndInsertAfter, const TRect &rect, uint flags)
Changes the size of the window pointed to by rect.
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
int GetId() const
Returns Attr.Id, the ID used to find the window in a specified parent's child list.
void GetWindowRect(TRect &rect) const
Gets the screen coordinates of the window's rectangle and copies them into rect.
bool ModifyStyle(uint32 offBits, uint32 onBits, uint swpFlags=0)
Modifies the style bits of the window.
uint32 GetStyle() const
Gets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
HWND GetHandle() const
Returns the handle of the window.
Definition of class TCoolBar.
C++ Functor template implementation.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
TIPtrArray< TCoolBand * > TCoolBandArray
#define GETOBJMFUNCTOR(T, type, memberFunc)
#define PUTMFUNCTOR(T, type, memberFunc)
#define GETPUTOBJMFUNCTOR(T, type, memberGet, memberPut)
#define GETPUTMFUNCTOR(T, type, memberGet, memberPut)
Definition of class TImageList, an ImageList Common Control wrapper.
Object Windows Library (OWLNext Core).
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
DIAG_DECLARE_GROUP(OwlThread)