#include <TTransparentEditText.h>
Inheritance diagram for TTransparentEditText:
Protected Member Functions | |
TTransparentEditText (HIViewRef inControl) | |
Constructor. The real initialisation takes place in Initialize(). | |
virtual | ~TTransparentEditText () |
Clean up after ourself. | |
virtual ControlKind | GetKind () |
virtual bool | UseNonblockingTracking () |
To enable the non-blocking tracking a subclass must override this method to return true. | |
virtual void | ProcessTextInput (UniChar *text, uint32_t count, uint32_t modifiers) |
Has the same effect as typing whatever characters are passed in text. | |
virtual void | SetDrawFrame (bool draw) |
Event handlers | |
virtual OSStatus | Initialize (TCarbonEvent &inEvent) |
Creates the ATSUI text style and text layout objects. | |
virtual void | TitleChanged () |
virtual void | ActiveStateChanged () |
Set mIsActive and force a redraw. | |
virtual OSStatus | SetFocusPart (ControlPartCode inDesiredFocus, Boolean inFocusEverything, ControlPartCode *outActualFocus) |
Set the mIsFocused member and force a redraw. | |
virtual OSStatus | BoundsChanged (UInt32 inOptions, const HIRect &inOriginalBounds, const HIRect &inCurrentBounds, RgnHandle inInvalRgn) |
Here we call UpdateTextLayout() because is needs to update the soft line breaks with the new control width. | |
virtual ControlPartCode | HitTest (const HIPoint &inWhere) |
Asks your view to return what part of itself (if any) is hit by the point given to it. | |
virtual OSStatus | StillTracking (TCarbonEvent &inEvent, HIPoint &from) |
Handle the mouse moving from one location to another while the button is still held down. | |
virtual OSStatus | StartTracking (TCarbonEvent &inEvent, HIPoint &from) |
Handle the initial mouse down event. | |
virtual void | DrawStaticBackground (RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing) |
virtual void | CompatibleDraw (RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing) |
The fun part of the control. | |
virtual UInt32 | GetBehaviors () |
virtual OSStatus | SetData (OSType inTag, ControlPartCode inPart, Size inSize, const void *inPtr) |
This method is used to set the text in the edit field, or attributes of that text. | |
virtual OSStatus | GetData (OSType inTag, ControlPartCode inPart, Size inSize, Size *outSize, void *inPtr) |
This method can return the text or various information about it and the current settings. | |
virtual OSStatus | TextInput (TCarbonEvent &inEvent) |
Handle all key events. |
This control subclass works like a standard unicode edit text control, except for how it draws. It will never erase the background with a solid color, and it does not draw any sort of frame or box around the text. The focus ring may be turned off.
|
Constructor. The real initialisation takes place in Initialize().
|
|
Clean up after ourself.
|
|
Set
|
|
Here we call Then we force a redraw. |
|
The fun part of the control. Because the HIView coordinates have 0 of the y axis at the upper left, we must flip the context by using a y scale value of -1.0. Then coordinates are translated so that 0, 0 is at the bottom left. The context graphics state is saved and restored. Implements TViewNoCompositingCompatible. |
|
Reimplemented from TViewNoCompositingCompatible. |
|
GetBehaviors Reimplemented from TViewNoCompositingCompatible. |
|
This method can return the text or various information about it and the current settings.
Reimplemented from TViewNoCompositingCompatible. |
|
|
|
Asks your view to return what part of itself (if any) is hit by the point given to it.
The point is in view coordinates, so you should get the view rect to do bounds checking. All points within the view are considered to be in the Reimplemented from TViewNoCompositingCompatible. |
|
Creates the ATSUI text style and text layout objects. At this point, the text storage will most likely be empty, so we're just setting things up to be updated once text is set. We also activate keyboard focus and unicode text entry events. Wouldn't be much use without those! |
|
Has the same effect as typing whatever characters are passed in text. It may be called once for a group of multiple characters, or it may be called repeatedly with a single character at a time. Both command and data characters are handled. Only the first character is looked at as a possible command (e.g., arrow key, enter, tab, etc). |
|
This method is used to set the text in the edit field, or attributes of that text.
|
|
|
|
Set the
Reimplemented from TViewNoCompositingCompatible. |
|
Handle the initial mouse down event.
Reimplemented from TViewNoCompositingCompatible. |
|
Handle the mouse moving from one location to another while the button is still held down.
Reimplemented from TViewNoCompositingCompatible. |
|
Handle all key events.
|
|
|
|
To enable the non-blocking tracking a subclass must override this method to return true.
Reimplemented from TViewNoCompositingCompatible. |