EditorGadGet

Mac OSX specific forum
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: EditorGadGet

Post by Danilo »

Yes, or CocoaMessage(0,GadgetID(0),"display") to force display update.
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Re: EditorGadGet

Post by spacebuddy »

Zooming text in and out is very complicated, to complicated for my head :oops:

if I zoom 0.5 a few times then set it back to 1 not zooming back properly :shock:
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: EditorGadGet

Post by Danilo »

Zooming with 1 does nothing. If you zoom with 0.5 for 3 times, you need to zoom with 2.0 for 3 times to go back.

For absolute Zoom values, use this, and see documentation for it:

Code: Select all

    w = GadgetWidth(0)
    h = GadgetHeight(0)
    SmallerZoom.f = 1.0 ; 1.0 = 100%
                        ; 2.0 = 2 times smaller (half size)
                        ; 0.5 = 2 times bigger (double size)
                        ; -1.0 = 100% size, and mirrored/switched
    size.NSSize
    size\width = w * SmallerZoom
    size\height = h * SmallerZoom
    CocoaMessage(0,GadgetID(0),"setBoundsSize:@",@size)
    CocoaMessage(0,GadgetID(0),"display")
Post Reply