Fetching contributors…
Cannot retrieve contributors at this time
78 lines (66 sloc) 2.4 KB
* FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
* Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* For further information please contact the author by e-mail
* at "".
class FXApp;
class FXDrawable;
class FXImage;
class FXBitmap;
class FXIcon;
class FXFont;
%exception FXDCWindow::FXDCWindow {
$action FXRbRegisterRubyObj(self, result);
rb_ensure(VALUEFUNC(rb_yield), self, VALUEFUNC(FXRbDCWindow::endit), self);
* Window Device Context
* The Window Device Context allows drawing into an FXDrawable, such as an
* on-screen window (FXWindow and derivatives) or an off-screen image (FXImage
* and its derivatives).
* Because certain hardware resources are locked down, only one FXDCWindow may be
* locked on a drawable at any one time.
class FXDCWindow : public FXDC {
%extend {
/// Construct for painting in response to expose;
/// This sets the clip rectangle to the exposed rectangle
FXDCWindow(FXDrawable* draw,FXEvent* event){
return new FXRbDCWindow(draw,event);
/// Construct for normal drawing;
/// This sets clip rectangle to the whole drawable
FXDCWindow(FXDrawable* draw){
return new FXRbDCWindow(draw);
/// Begin locks in a drawable surface
void begin(FXDrawable *draw);
/// Return active drawable
FXDrawable *drawable() const;
/// End unlock the drawable surface
void end();
/// Destructor
virtual ~FXDCWindow();