Class TCastleIntegerSlider
Unit
Declaration
type TCastleIntegerSlider = class(TCastleAbstractSlider)
Description
Slider to change an integer value within a given range.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleUserInterfaceFont
- TCastleAbstractSlider
- TCastleIntegerSlider
Overview
Fields
![]() |
nested const DefaultMin = 0; |
![]() |
nested const DefaultMax = 10; |
Methods
![]() |
constructor Create(AOwner: TComponent); overload; override; |
![]() |
constructor Create(AOwner: TComponent; const ValuePointer: PInteger; const AMin, AMax: Integer; const AOnChange: TNotifyEvent); reintroduce; overload; |
![]() |
function PropertySections(const PropertyName: String): TPropertySections; override; |
![]() |
procedure Render; override; |
![]() |
function Press(const Event: TInputPressRelease): boolean; override; |
![]() |
function Motion(const Event: TInputMotion): boolean; override; |
![]() |
function ValueToStr(const AValue: Integer): string; virtual; |
Properties
![]() |
property Min: Integer read FMin write SetMin default DefaultMin; |
![]() |
property Max: Integer read FMax write SetMax default DefaultMax; |
![]() |
property Value: Integer read FValue write SetValue default DefaultMin; |
Description
Fields
![]() |
nested const DefaultMin = 0; |
This item has no description. |
![]() |
nested const DefaultMax = 10; |
This item has no description. |
Methods
![]() |
constructor Create(AOwner: TComponent); overload; override; |
This item has no description. |
![]() |
constructor Create(AOwner: TComponent; const ValuePointer: PInteger; const AMin, AMax: Integer; const AOnChange: TNotifyEvent); reintroduce; overload; |
An easy way to construct integer slider. |
![]() |
function PropertySections(const PropertyName: String): TPropertySections; override; |
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
![]() |
procedure Render; override; |
This item has no description. Showing description inherited from TCastleUserInterface.Render. Render a control. Called only when Exists and GLInitialized, you can depend on it in the implementation of this method. Do not explicitly call this method. Instead, render controls by adding them to the TCastleContainer.Controls list, or render them explicitly (for off-screen rendering) by TCastleContainer.RenderControl. This is method should only be overridden in your own code. Before calling this method we always set some OpenGL state, and you can depend on it (and you can carelessly change it, as it will be reset again before rendering other control). OpenGL state always set:
Beware that GLSL RenderContext.CurrentProgram has undefined value when this is called. You should always set it, before making direct OpenGL drawing calls (all the engine drawing routines of course do it already, this is only a concern if you make direct OpenGL / OpenGLES calls). |
![]() |
function Press(const Event: TInputPressRelease): boolean; override; |
This item has no description. Showing description inherited from TCastleUserInterface.Press.
Handle press or release of a key, mouse button or mouse wheel. Return When implementing in descendants it is best to override it like this: function TMyControl.Press(const Event: TInputPressRelease): boolean; begin Result := inherited; if Result then Exit; // exit if ancestor already handled this event if Event.IsKey(keyEnter) then begin // do something in reaction to Enter key ... // let engine know that this input event was handled Exit(true); end; if Event.IsMouseButton(buttonLeft) then begin // do something in reaction to left mouse button press ... // let engine know that this input event was handled Exit(true); end; end;
These events are generated for all UI controls, whether they are considered "interactive" or not. These events are generated for non-interactive controls like TCastleRectangleControl or TCastleLabel as well. For example, these events ignore the TCastleButton.Enabled state, they are generated always (see https://github.com/castle-engine/castle-engine/issues/413 ). Use instead TCastleButton.OnClick to detect clicks on a button in a way that honors the TCastleButton.Enabled state. When a control returns The events PreviewPress and PreviewRelease are passed first to the parent control, before children have a chance to process this event. In partcular, overriding them makes sense if you draw something that "looks clickable" in TCastleUserInterface.RenderOverChildren. The events Press and Release are passed to the parent only after the children had a chance to process this event. Overriding them makes sense if you draw something that "looks clickable" in TCastleUserInterface.Render, which is the standard place you should draw stuff. For example our TCastleButton draws there. Note that releasing of the mouse wheel is not reported now by any backend. Only releasing of keys and mouse buttons is reported. |
![]() |
function Motion(const Event: TInputMotion): boolean; override; |
This item has no description. Showing description inherited from TCastleUserInterface.Motion.
|
![]() |
function ValueToStr(const AValue: Integer): string; virtual; |
This item has no description. |
Properties
![]() |
property Min: Integer read FMin write SetMin default DefaultMin; |
This item has no description. |
![]() |
property Max: Integer read FMax write SetMax default DefaultMax; |
This item has no description. |
![]() |
property Value: Integer read FValue write SetValue default DefaultMin; |
Current value. Usually within Min and Max range, although the general code should be ready for handle any value here (to work even during changes to Min and Max properties). |
Generated by PasDoc 0.16.0.