to use simply subclass and add a finalize method and refresh method, use finalize to create the self.contents bitmap and call refresh to draw the content of the window, you can use it just like you would a normal window exsept you should NEVER create self.contents in def initialize the class has a special handling for this in def finalize.
moving? returns true if the window need moving
resizing? returns true if the window needs resizing
at_dest? returns true if the window needs neither moving nor resizing
move(x, y, mode, speed)
x > the x you want to move the window too
y > the y you want to move the window too
mode > 0 or 1 refers to the two different algorithms used for movement, default is 0
speed > the pixels the window will grow or shrink each frame should never be lower than 2, default is 2.
when mode is 1 speed works differently; when speed is 1 the window open instantly, when speed is 2 it open half the distance in the first frame half the remaining distance in the second and so on, when speed is 3 it open 30% of the remaining distance fist frame, 33.333% of the remaining distance the second and so on, when speed is 4 it moves 25% of the raining distence each frame, 5 it moves 20%, 6 > 16.666%, 7 > 14.2857%, ECT.
resize(w, h, mode, speed, pin)
w > new width
h > new height
mode > 0 or 1 refers to the two different algorithms used for resizing, default is 0
speed > the pixels the window will grow or shrink each frame should never be lower than 2, default is 2.
when mode is 1 speed works differently; when speed is 1 the window open instantly, when speed is 2 it open half the distance in the first frame half the remaining distance in the second and so on, when speed is 3 it open 30% of the remaining distance fist frame, 33.333% of the remaining distance the second and so on, when speed is 4 it moves 25% of the raining distence each frame, 5 it moves 20%, 6 > 16.666%, 7 > 14.2857%, ECT.
pin > should the top left corner be kept in the same place? true or false, default is false
NOTE: the resize method will call refresh when the window is done resizing
close(dir, mode, speed, pin)
dir > direction the window should close. o is top to bottom, 1 is left to right, 2 is both at the same time
mode > 0 or 1 refers to the two different algorithms used for resizing, default is 0
speed > the pixels the window will grow or shrink each frame should never be lower than 2, default is 2.
when mode is 1 speed works differently; when speed is 1 the window open instantly, when speed is 2 it open half the distance in the first frame half the remaining distance in the second and so on, when speed is 3 it open 30% of the remaining distance fist frame, 33.333% of the remaining distance the second and so on, when speed is 4 it moves 25% of the raining distence each frame, 5 it moves 20%, 6 > 16.666%, 7 > 14.2857%, ECT.
pin > should the top left corner be kept in the same place? true or false, default is false
NOTE: the close command disposes the contents of the window immediately and will automatically disposes of the window when the animation is complete. make sure you are aware of this when calling the update method.
NOTE: NO animation will take place unless the update method is called.