TSliderMetro

Fonte: source/classes/sliderm.prg

Not inherited from TControl (standalone class)

TSliderMetro implements a slide-to-unlock screen in the style of Windows Metro / Modern UI. It displays a full-screen bitmap overlay with "FiveWin touch" and "Slide to unlock" text, and responds to vertical drag gestures. Dragging the bitmap upward reveals the underlying window. It is designed for touch-enabled kiosk or tablet applications.

Key DATA Members

DATATypeDescription
oBmpObjectTBitmap instance holding the full-screen background image
oFont1ObjectLarge font ("Segoe UI Light" 90pt bold) for the title text
oFont2ObjectMedium font ("Segoe UI Light" 60pt bold) for the instruction text
lDragLogicalIndicates a drag operation is in progress

Methods

MethodDescription
New( cBmpFile, oWnd )Create a slide-to-unlock overlay. Loads the background bitmap and creates the title fonts
GoBottom()Animate the bitmap back to the locked position (nTop = 0)
GoTop()Animate the bitmap upward off-screen to unlock the window
MouseMove( nRow, nCol )Track vertical drag distance and reposition the bitmap accordingly

Example: Unlock Screen

#include "FiveWin.ch"

function Main()

   local oWnd, oLock

   DEFINE WINDOW oWnd TITLE "App" SIZE 800, 600

   oLock = TSliderMetro():New( "lock_bg.jpg", oWnd )

   ACTIVATE WINDOW oWnd CENTERED

return nil

Notes

Veja Também