PureBoard
http://forums.purebasic.com/german/

Module für PureBasic 5.6x
http://forums.purebasic.com/german/viewtopic.php?f=8&t=30383
Seite 4 von 4

Autor:  Thorsten1867 [ 11.02.2019 11:46 ]
Betreff des Beitrags:  Re: Module für PureBasic 5.6x

ScaleGadget.pbi
PB V5.6x
(All OS)

Scaling of all Windows and Gadgets

Code:
  SetScaleGadget(x.f = 1.0, y.f = 1.0, dx.f = 1.0, dy.f = 1.0, Font.f = 0.0)
  SetScaleWindow(x.f = 1.0, y.f = 1.0, dx.f = 1.0, dy.f = 1.0)
  SetScaleFontID(Gadget, FontID)
  SetScaleFontCallback(Gadget, *Callback)

  SetScaleImage(Gadget, ImageID)
  SetScaleMode(Mode)                      ; Set mode for result of position and size from windows and gadgets
  SetScaleModeImage(Mode)                 ; Set mode update of images size
  SetScaleModeFont(Mode)                  ; Set mode update of font size

  GetDynamicScaleX(Window)                ; Returns the current dynamic scaling of ScaleAllGadgets
  GetDynamicScaleY(Window)                ; Returns the current dynamic scaling of ScaleAllGadgets

  ScaleResizeGadget(Gadget, x, y, dx, dy) ; Resize gadget with scaling and dynamic scaling
  ScaleResizeWindow(Window, x, y, dx, dy) ; Resize window
  ScaleAllGadgets(Window, DeltaDY = 0)    ; Scales dynamic all gadgets from the window

  ScaleOpenGadgetList(Gadget, GadgetItem = 0)
  ScaleCloseGadgetList()
  ScaleSetGadgetAttribute(Gadget, Attribute, Value)

  ScaleWindowWidth(Window, Mode = #PB_Window_InnerCoordinate)
  ScaleWindowHeight(Window, Mode = #PB_Window_InnerCoordinate)
  ScaleWindowBounds(Window, MinimumWidth, MinimumHeight, MaximumWidth, MaximumHeight)
  ScaleGadgetX(Gadget, Mode = 0)
  ScaleGadgetY(Gadget, Mode = 0)
  ScaleGadgetWidth(Gadget, Mode = 0)
  ScaleGadgetHeight(Gadget, Mode = 0)

  ScaleCloseWindow(Window)
  ScaleFreeGadget(Gadget)

  ScaleRegisterGadget(Gadget, *Callback = 0, Name.s = "") ; Register your owner draw gadget
  ScaleUnregisterGadget(Gadget)                           ; Unregister your owner draw gadget

  ScaleUpdateGadget(Gadget)

  CreateWindow(Name.s, Window, x, y, InnerWidth, InnerHeight, Title.s, Flags, ParentID)
  CreateGadget(Type, Name.s, Gadget, x, y, dx, dy, Text.s, Param1, Param2, Param3, Flags)

  ParentWindow(Gadget)
  ParentGadget(Gadget)

Seite 4 von 4 Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/