OWLNext 7.0
Borland's Object Windows Library for the modern age
|
#include <owl/picker.h>
Public Member Functions | |
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) | |
Public Member Functions inherited from owl::TPickerGadget | |
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) | |
virtual | ~TPickerGadget () |
virtual void | PopupAction () |
TGridPicker * | GetPicker () |
TPickerCell * | GetSelCel () |
Public Member Functions inherited from owl::TPopupButtonGadget | |
TPopupButtonGadget (int id, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TPopupType poptype=DownArrowAction, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4) | |
void | SetArrowWidth (uint width) |
uint | GetArrowWidth () |
void | GetDesiredSize (TSize &size) override |
void | SetBounds (const TRect &rect) override |
Public Member Functions inherited from owl::TButtonTextGadget | |
TButtonTextGadget (int id, TResId glyphResIdOrIndex, TStyle style=sBitmapText, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false, uint numChars=4) | |
Constructs a TButtonTextGadget object using the specified bitmap ID, button gadget ID, style, and type, with enabled set to false, in a button-up state, and reserved number chars in text = 4. | |
virtual | ~TButtonTextGadget () |
Destroys a TButtonTextGadget object. | |
LPCTSTR | GetText () const |
Returns the text for the gadget. | |
void | SetText (const tstring &text, bool repaint=true) |
Sets the text of the gadget. | |
void | SetText (LPCTSTR s, bool repaint=true) |
TStyle | GetStyle () const |
Returns the Style for the gadget. | |
void | SetStyle (const TStyle style, bool repaint=true) |
If the style stored in Style is not the same as the new style, SetStyle sets Style to the new style, and then if repaint is true calls Window->GadgetChangedSize(*this) to recalculate size of gadget. | |
TAlign | GetAlign () const |
Returns the Align for the gadget. | |
void | SetAlign (const TAlign align, bool repaint=true) |
If the align stored in Style is not the same as the new align, SetAlign sets Align to the new align, and then if repaint is true calls Invalidate to invalidate the rectangle. | |
TLayoutStyle | GetLayoutStyle () const |
Returns the LayoutStyle for the gadget. | |
void | SetLayoutStyle (const TLayoutStyle style, bool repaint=true) |
If the style stored in LayoutStyle is not the same as the new style, SetLayoutStyle sets LayoutStyle to the new style, and then if repaint is true calls Window->GadgetChangedSize(*this) to recalculate size of gadget. | |
const TFont & | GetFont () const |
Returns the effective font used to render the text for this gadget. | |
void | SetFont (const TFont &, bool repaint=true) |
Sets the font to be used by the gadget. | |
virtual void | CommandEnable () |
Initiates a command enable for this button gadget. | |
Public Member Functions inherited from owl::TButtonGadget | |
TButtonGadget (TResId glyphResIdOrIndex, int id, TType type=Command, bool enabled=false, TState state=Up, bool sharedGlyph=false) | |
Construct a button gadget that loads its own bitmap resource. | |
~TButtonGadget () override | |
Destruct this button gadget, freeing up allocated resources. | |
void | SetButtonState (TState newState) |
Set the state of a button. | |
TState | GetButtonState () const |
Returns the state of the button. | |
TType | GetButtonType () const |
Return the type of the button. | |
bool | GetNotchCorners () const |
Returns true if the button has rounded corners. | |
void | SetNotchCorners (bool notchCorners=true) |
By default, SetNotchCorners implements notched corners for buttons. | |
bool | GetAntialiasEdges () const |
Return the current shadow style of the button. | |
void | SetAntialiasEdges (bool anti=true) |
Turns the antialiasing of the button bevels on or off. | |
Public Member Functions inherited from owl::TGadget | |
TGadget (int id=0, TBorderStyle borderStyle=None) | |
Construct a gadget with a given id and border style. | |
virtual | ~TGadget () |
Destroys a TGadget interface object and removes it from its associated window. | |
int | GetId () const |
Gets the ID for the gadget. | |
TRect & | GetBounds () |
Returns the boundary rectangle for the gadget. | |
const TRect & | GetBounds () const |
Returns the boundary rectangle for the gadget. | |
virtual void | SetEnabled (bool enabled) |
Enables or disables keyboard and mouse input for the gadget. | |
bool | GetEnabled () const |
Determines whether keyboard and mouse input have been enabled for the specified gadget. | |
virtual void | SetVisible (bool visible) |
Changes the visibility of the gadget. | |
bool | IsVisible () const |
Returns true if the gadget is visible. | |
bool | IsWindowVisible () const |
check to see if the button's created | |
void | SetEndOfRow (bool eor) |
Sets the end of row property for the gadget. | |
bool | IsEndOfRow () const |
Returns true if this gadget is at the end of a row. | |
bool | IsWideAsPossible () const |
Indicates whether the gadget width will be adjusted by the gadget window to be as wide as possible in the remaining space. | |
void | SetWideAsPossible (bool wide=true) |
Sets the flag that indicates whether the gadget width will be adjusted by the gadget window to be as wide as possible in the remaining space. | |
void | SetShrinkWrap (bool shrinkWrapWidth, bool shrinkWrapHeight) |
Simple set accessor to set whether shrinkwrapping is performed horizontally and/or vertically. | |
void | SetSize (const TSize &size) |
Alters the size of the gadget and then calls TGadgetWindow::GadgetChangedSize() for the size change to take effect. | |
void | GetOuterSizes (int &left, int &right, int &top, int &bottom) |
Get the four total outer sizes in pixels which consists of the margins plus the borders. | |
void | GetInnerRect (TRect &rect) |
Computes the area of the gadget's rectangle excluding the borders and margins. | |
virtual bool | IdleAction (long idleCount) |
Called during idle time to allow the gadget to perform any idle actions. | |
TGadget * | NextGadget () |
Returns the next gadget in the list of gadgets. | |
void | SetBorders (const TBorders &borders) |
Sets the borders for the gadget. | |
TBorders & | GetBorders () |
Gets the gadget's borders measured in border units that are based on SM_CXBORDER and SM_CYBORDER. | |
void | SetMargins (const TMargins &margins) |
Sets the margins of the gadget. | |
TMargins & | GetMargins () |
Gets the margin dimensions. | |
void | SetBorderStyle (TBorderStyle bs) |
Set the border style used by this gadget. | |
TBorderStyle | GetBorderStyle () const |
Gets the style for the gadget's borders. | |
Protected Member Functions | |
virtual void | BuildCelArray () |
virtual void | GetSelection () |
void | CopyCellBitmap () |
Protected Member Functions inherited from owl::TPickerGadget | |
virtual void | Created () |
virtual void | Inserted () |
Protected Member Functions inherited from owl::TPopupButtonGadget | |
void | Paint (TDC &dc) override |
void | LButtonDown (uint modKeys, const TPoint &point) override |
void | LButtonUp (uint modKeys, const TPoint &point) override |
void | RButtonDown (uint modKeys, const TPoint &) override |
void | BeginPressed (const TPoint &p) override |
void | CancelPressed (const TPoint &p, bool mstate=false) override |
virtual void | PaintArrowButton (TDC &dc) |
virtual void | PaintArrow (TDC &dc, const TRect &rect) |
Protected Member Functions inherited from owl::TButtonTextGadget | |
virtual void | Layout (TRect &srcRect, TRect &textRect, TRect &btnRect) |
Layout button and text in the control area. | |
virtual void | PaintText (TDC &dc, TRect &rect, const tstring &text) |
Paint Text. | |
virtual void | SysColorChange () |
Respond to a WM_SYSCOLORCHANGE, in this case to rebuild the CelArray with possibly new 3d colors. | |
void | GetTextSize (TSize &size) |
Protected Member Functions inherited from owl::TButtonGadget | |
void | PaintBorder (TDC &dc) override |
void | MouseEnter (uint modKeys, const TPoint &p) override |
Mouse has entered this button, (not pressed). | |
void | MouseMove (uint modKeys, const TPoint &p) override |
Mouse has moved (back) into this gadget. | |
void | MouseLeave (uint modKeys, const TPoint &p) override |
Mouse has left this button, (not pressed). | |
virtual void | PaintFace (TDC &dc, const TRect &rect) |
Paints the face of the button. | |
virtual TDib * | GetGlyphDib () |
Virtual function responsible for supplying the dib for the glyph. | |
virtual void | ReleaseGlyphDib (TDib *glyph) |
Virtual function responsible for releasing glyph dib as needed based on how GetGlyphDib() got it (if different from new/delete). | |
virtual void | Activate (const TPoint &p) |
The action method called on a completed 'click', generates WM_COMMAND. | |
void | SetButtonType (TType newType) |
Sets the type of the button. | |
void | SetGlyphIndex (int index) |
bool | IsPressed () const |
Returns true if the button is pushed or false if it is released. | |
void | CheckExclusively () |
Perform an exclusive checking of this gadget by unchecking the neighboring exclusive button gadgets. | |
TResId | GetResId () const |
Returns the resource ID for this button gadget's bitmap. | |
TCelArray * | GetCelArray () |
Returns the CelArray used to cache glyph states. | |
const TCelArray * | GetCelArray () const |
Returns the CelArray used to cache glyph states. | |
TPoint & | GetBitmapOrigin () |
Returns the x and y coordinates of the bitmap used for this button gadget. | |
const TPoint & | GetBitmapOrigin () const |
Returns the x and y coordinates of the bitmap used for this button gadget. | |
void | SetBitmapOrigin (const TPoint &bitmapOrigin) |
Sets the x and y coordinates of the bitmap used for this button gadget. | |
Protected Member Functions inherited from owl::TGadget | |
TGadgetWindow * | GetGadgetWindow () |
Return a pointer to the owning or parent window for the gadget. | |
const TGadgetWindow * | GetGadgetWindow () const |
Return a pointer to the owning or parent window for the gadget. | |
virtual void | Moved () |
This is the virtual called when a gadget is relocated. | |
virtual void | Removed () |
Virtual called after a gadget is removed from a window. | |
bool | IsHaveMouse () const |
Return true if mouse inside gadget. | |
void | SetInMouse (bool state) |
Sets if mouse inside gadget or not. | |
bool | GetTrackMouse () const |
void | SetTrackMouse (bool track) |
void | Invalidate (bool erase=true) |
Used to invalidate the active (usually nonborder) portion of the gadget, Invalidate calls InvalidateRect and passes the boundary width and height of the area to erase. | |
void | InvalidateRect (const TRect &rect, bool erase=true) |
Invalidate a rectangle in our containing window. | |
void | Update () |
Paint now if possible. | |
virtual bool | PtIn (const TPoint &point) |
Default behavior returns true if the point is within the receiver's bounding rect. | |
virtual void | RButtonUp (uint modKeys, const TPoint &point) |
void | ChangeBorderStyle (TBorderStyle bs) |
Simply changes the border style without recalculating the gadget size. | |
Additional Inherited Members | |
Public Types inherited from owl::TPopupButtonGadget | |
enum | TPopupType { Normal , DownArrow , DownArrowAction } |
Public Types inherited from owl::TButtonTextGadget | |
enum | TAlign { aLeft , aCenter , aRight } |
Enumerates the text-alignment attributes. More... | |
enum | TStyle { sBitmap =0x001 , sText =0x002 , sBitmapText =0x003 } |
TStyle contains values that defines how gadget will be displayed: More... | |
enum | TLayoutStyle { lTextLeft , lTextTop , lTextRight , lTextBottom } |
TLayoutStyle contains values that defines how bitmap and text will be layout. More... | |
Public Types inherited from owl::TButtonGadget | |
enum | TType { Command , Exclusive , NonExclusive , SemiExclusive , RepeatCmd } |
Enumerates the types of button gadgets. More... | |
enum | TState { Up , Down , Indeterminate } |
TState enumerates the three button positions during which the button can be pressed: up (0), down (1), and an indeterminate state (2). More... | |
Public Types inherited from owl::TGadget | |
enum | TBorderStyle { None , Plain , Raised , Recessed , Embossed , Grooved , ButtonUp , ButtonDn , WndRaised , WndRecessed , WellSet } |
Gadget border styles. More... | |
Protected Types inherited from owl::TPopupButtonGadget | |
enum | TPopFlags { ArrowPressed = 0x001 , HasCapture = 0x002 } |
Protected Types inherited from owl::TButtonGadget | |
enum | { CelNormal , CelDisabled , CelIndeterm , CelDown , CelPressed , CelsTotal } |
Glyph types and construction functions. More... | |
Protected Attributes inherited from owl::TPickerGadget | |
TPopupPicker * | Picker |
TPickerCell * | Selected |
currect selected cell | |
Protected Attributes inherited from owl::TPopupButtonGadget | |
TPopupType | PopupType |
uint | PopFlags |
uint | ArrowWidth |
owl::TBitmapPickerGadget::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 ) |
Definition at line 1873 of file picker.cpp.
|
protectedvirtual |
Reimplemented from owl::TButtonGadget.
Definition at line 1915 of file picker.cpp.
References owl::TButtonGadget::BuildCelArray(), and CopyCellBitmap().
|
protected |
Definition at line 1886 of file picker.cpp.
References owl::TPickerGadget::Selected, and TYPESAFE_DOWNCAST.
|
protectedvirtual |
Reimplemented from owl::TPickerGadget.
Definition at line 1925 of file picker.cpp.
References CopyCellBitmap(), owl::TPickerGadget::GetSelection(), and owl::TPickerGadget::Selected.