17#if !defined(OWL_PICKER_H)
21#if defined(BI_HAS_PRAGMA_ONCE)
28#if !defined(OWL_PICKER)
30# define OWL_PICKER L"OWL_Picker"
32# define OWL_PICKER "OWL_Picker"
36#if !defined(RC_INVOKED)
80 TPickerCell(
int id=0,TBorderStyle borderStyle = Flat);
83 virtual void Paint(
TDC& dc,
TRect* r=0,
bool drawbrd =
true);
89 virtual void Select(
bool sel=
true);
179class TPickerCellArray;
198 int x,
int y,
int w=0,
int h=0,
205 void SetSelection(
int sel = 0);
213 void SetColumns(
int colmn = 4);
216 void SetFont(
const TFont& font);
222 void AddCell(
TPickerCell* cells,
bool select =
false);
226 void ModifyPopStyle(
uint off,
uint on);
228 virtual bool IsFlatStyle();
229 void EnableDefault(LPCTSTR text=0,
int resId = 0,
TPickerCell* cl=0);
234 void EnableButton(LPCTSTR text=0,
int resId = 0,
TPickerCell* cl=0);
241 auto GetTooltip() const ->
TTooltip* override;
242 void EnableTooltip(
bool enable = true) override;
246 void SetMargins(const
TMargins& margins);
248 virtual
void Layout();
270 void GetWindowClass(WNDCLASS&)
override;
271 void Paint(
TDC&,
bool erase,
TRect&)
override;
272 void SetupWindow()
override;
273 auto PreProcessMsg(MSG&) ->
bool override;
277 #if !defined(STRIP_UNDEFINED)
281 void EvSetFocus(THandle hWndLostFocus);
282 void EvKillFocus(THandle hWndGetFocus);
283 void EvLButtonDown(
uint modKeys,
const TPoint& point);
284 void EvLButtonDblClk(
uint modKeys,
const TPoint& point);
285 void EvLButtonUp(
uint modKeys,
const TPoint& point);
286 void EvMouseMove(
uint modKeys,
const TPoint& point);
295 virtual tstring LoadTipText(
int resId);
297 virtual void SetStatusBarMessage(
int id);
299 virtual void PaintDivider(
TDC& dc,
const TRect& rect);
301 virtual bool CallCustomBox();
303 virtual void NotifyParent(
uint code);
305 virtual void ExitPicker(
bool status =
false);
310 int Contains(
const TPoint& point);
311 void GetCellRect(
TRect& rect);
313 void RefocusCell(
int loc);
346 int x,
int y,
int w=0,
int h=0,
360 void ExitPicker(
bool status =
false)
override;
373 int x,
int y,
int w=0,
int h=0,
400 bool PaletteRealized;
416 bool enabled =
false,
418 bool sharedGlyph =
false,
450 bool enabled =
false,
452 bool sharedGlyph =
false,
477 bool enabled =
false,
479 bool sharedGlyph =
false,
619 Format(DT_CENTER|DT_SINGLELINE|DT_VCENTER|DT_END_ELLIPSIS|DT_NOCLIP)
Definition of a bit set and a character set.
virtual void PaintCell(TDC &dc, TRect &rect)
virtual void QueryBounds(TRect &rect)
TCelArray * GetCelArray()
void SetCelArray(TCelArray *array, TAutoDelete=NoAutoDelete)
TBitmapCell(int id=0, TCelArray *array=0, int index=0, TBorderStyle borderStyle=Flat)
virtual void GetSelection()
virtual void BuildCelArray()
TBitmapPickerGadget(TPopupPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
TStyle
TStyle contains values that defines how gadget will be displayed:
@ sBitmapText
Both text and bitmap are displayed.
TCelArray is a horizontal array of cels (a unit of animation) created by slicing a portion of or an e...
TColorCell(int id=0, const TColor &clr=TColor::None, TBorderStyle borderStyle=Flat)
const TColor & GetColor() const
virtual void PaintCell(TDC &dc, TRect &rect)
void SetColor(const TColor &clr)
Class wrapper for management of color values.
static const TColor None
not-a-color
virtual void GetFillRect(TRect &rect, const TRect &faceRect)
TColorPickerGadget(TColorPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
virtual void PaintFace(TDC &dc, const TRect &rect)
virtual void GetSelection()
TColor ColorSel
currect selected color
auto CallCustomBox() -> bool override
void NotifyParent(uint code) override
void EvPaletteChanged(HWND hWndPalChg)
const TColor & GetCustomColor() const
void SetCustomColors(TColor *colors)
TColorPicker(TWindow *parent, int id, int x, int y, int w=0, int h=0, TModule *module=0)
void SetupWindow() override
void Paint(TDC &, bool erase, TRect &) override
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),...
TDC is the root class for GDI DC wrappers.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
void EnableButton(LPCTSTR text=0, int resId=0, TPickerCell *cl=0)
void EnableDefault(LPCTSTR text=0, int resId=0, TPickerCell *cl=0)
void EvActivateApp(bool active, DWORD threadId)
virtual void SetBounds(TPickerCell &cell, const TRect &rect)
set bounds for cell
TPickerCell * GetFocusedCell()
TGridPicker(TWindow *parent, int id, int x, int y, int w=0, int h=0, TModule *module=0)
DECLARE_RESPONSE_TABLE(TGridPicker)
void EnableButton(const tstring &text, int resId=0, TPickerCell *cl=0)
uint EvGetDlgCode(const MSG *msg)
TPickerCell * GetCell(int loc)
void SetTarget(TWindow *wnd)
void EnableDefault(const tstring &text, int resId=0, TPickerCell *cl=0)
virtual bool IsFlatStyle()
TPickerCell * GetSelectedCell()
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPalette is the GDI Palette class derived from TGdiObject.
void SetBorderStyle(TBorderStyle bs)
virtual void EnterMouse()
virtual void LeaveMouse()
virtual void PaintBorder(TDC &dc, TRect &rect)
virtual void SetParent(TGridPicker *parent)
virtual void Select(bool sel=true)
TBorderStyle
Cell border styles. These match TIUBorder's TStyles exactly.
@ Recessed
Status field style recessed.
@ Raised
Status field style raised.
@ WellSet
Well option set (auto grows + 1).
@ WndRaised
Raised window outer+inner edge.
@ Embossed
Grouping raised emboss bead.
@ None
No border painted at all.
@ ButtonDn
Button in down position.
@ Plain
Plain plain window frame.
@ WndRecessed
Input field & other window recessed.
@ Grooved
Grouping groove.
@ ButtonUp
Button in up position.
TBorderStyle GetBorderStyle() const
Return the borderstyle the cell is using.
virtual bool PtIn(const TPoint &pt)
virtual void PaintCell(TDC &dc, TRect &rect)=0
TPickerCell(int id=0, TBorderStyle borderStyle=Flat)
virtual void QueryBounds(TRect &rect)
TPickerGadget(TPopupPicker &picker, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4)
TPickerCell * Selected
currect selected cell
TGridPicker * GetPicker()
virtual void GetSelection()
TPickerCell * GetSelCel()
virtual void PopupAction()
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
bool Contains(const TPoint &point) const
Returns true if the given point lies within this rectangle; otherwise, it returns false.
TTextCell(int id=0, const tstring &text=tstring(), TBorderStyle borderStyle=Flat)
void SetFormat(uint format)
virtual void PaintCell(TDC &dc, TRect &rect)
void SetText(const tstring &text)
const tstring & GetText() const
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...
void EvActivateApp(bool active, DWORD threadId)
The default message handler for WM_ACTIVATEAPP.
virtual TTooltip * GetTooltip() const
uint EvGetDlgCode(const MSG *msg)
The default message handler for WM_GETDLGCODE.
HWND THandle
TWindow encapsulates an HWND.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Object Windows Library (OWLNext Core).
Used by the TGadgetWindow and TGadget classes, TMargins contains the measurements of the margins for ...