Download Now
Forums

    Reference Codebot.Render.Scenes.Widgets.pas

    Part of the Codebot Render package

    The Codebot.Render.Scenes.Widgets unit gives you TWidgetScene, a scene with a user interface of widgets, which you add to its Widget property. Input goes to the widgets first and is only passed on to your scene when no widget handles it. Call WidgetsRender from your Render method to draw the widgets, and override DefaultTheme if you want to change the theme of every widget. WidgetMatrix lets you transform all the widgets at once.

    The unit also gives you TSimpleWidgetScene, a widget scene that needs no Render method. It clears the scene and draws the widgets each frame, and the first time it draws it places the widgets you added in the middle of the scene, where a window can still be dragged from. Its CloseHandler method can be given to the OnClick of a button or the OnClose of a window to close the program.

    The main widget of the first widget scene is where the file and picture dialogs made from widgets are shown, so in most programs one widget scene is all you need.

    Items 18 items

    NameKindLine
    TSimpleWidgetSceneclass66
    CenterWidgetsprocedure71
    CloseHandlerprocedure75
    Renderprocedure73
    TWidgetSceneclass26
    DefaultThemefunction40
    DoKeyDownprocedure44
    DoKeyUpprocedure45
    DoMouseDownprocedure47
    DoMouseMoveprocedure48
    DoMouseUpprocedure49
    DoMouseWheelprocedure50
    DoTextInputprocedure46
    Finalizeprocedure43
    Initializeprocedure42
    WidgetsRenderprocedure38
    Widgetproperty52
    WidgetMatrixproperty54