/***********************************************************************
 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
 * Copyright (c) 2001-2003 by J. 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
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * 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 "lyle@users.sourceforge.net".
 ***********************************************************************/

/***********************************************************************
 * $Id: FXRbTopWindow.h,v 1.1.2.5 2003/02/20 16:43:17 lyle Exp $
 ***********************************************************************/

#ifndef FXRBTOPWINDOW_H
#define FXRBTOPWINDOW_H

#define DECLARE_FXTOPWINDOW_STUBS(klass) \
inline void klass ## _show(klass* self,FXuint placement){ \
  self->klass::show(placement); \
  } \
inline void klass ## _iconify(klass* self){ \
  self->klass::iconify(); \
  } \
inline void klass ## _deiconify(klass* self){ \
  self->klass::deiconify(); \
  }


#define IMPLEMENT_FXTOPWINDOW_STUBS(cls) \
  void cls::show(FXuint placement){ \
    FXRbCallVoidMethod(this,rb_intern("show"),placement); \
    } \
  void cls::iconify(){ \
    FXRbCallVoidMethod(this,rb_intern("iconify")); \
    } \
  void cls::deiconify(){ \
    FXRbCallVoidMethod(this,rb_intern("deiconify")); \
    }


class FXRbTopWindow : public FXTopWindow {
  FXDECLARE(FXRbTopWindow)
protected:
  FXRbTopWindow(){}
#include "FXRbObjectVirtuals.h"
#include "FXRbIdVirtuals.h"
#include "FXRbDrawableVirtuals.h"
#include "FXRbWindowVirtuals.h"
#include "FXRbTopWindowVirtuals.h"
public:
  // Construct unowned top-level window
  FXRbTopWindow(FXApp* a,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(a,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){}

  // Construct owned top-level window
  FXRbTopWindow(FXWindow* owner,const FXString& name,FXIcon *ic,FXIcon *mi,FXuint opts,FXint x,FXint y,FXint w,FXint h,FXint pl,FXint pr,FXint pt,FXint pb,FXint hs,FXint vs) : FXTopWindow(owner,name,ic,mi,opts,x,y,w,h,pl,pr,pt,pb,hs,vs){}

  // Mark dependencies for the GC
  static void markfunc(FXTopWindow* top);

  // Destructor
  virtual ~FXRbTopWindow(){
    FXRbUnregisterRubyObj(this);
    }
  };

#endif
