Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 90 lines (82 sloc) 3.143 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
/***********************************************************************
 * 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
 * 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@lylejohnson.name".
 ***********************************************************************/


/**
 * The Shell widget is used as the base class for top level windows, i.e.
 * windows which are direct children of the root window.
 */
class FXShell : public FXComposite {
protected:
  FXShell(){}
  FXShell(FXApp* a,FXuint opts,FXint x,FXint y,FXint w,FXint h);
  FXShell(FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h);
public:
  long onLayout(FXObject*,FXSelector,void* PTR_IGNORE);
  long onConfigure(FXObject*,FXSelector,void* PTR_EVENT);
  long onKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
  long onKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
  long onFocusNext(FXObject*,FXSelector,void* PTR_EVENT);
  long onFocusPrev(FXObject*,FXSelector,void* PTR_EVENT);
public:
  enum {
    ID_LAYOUT=FXComposite::ID_LAST,
    ID_LAST
    };
public:
  %extend {
    // Construct free-floating shell window
    FXShell(FXApp* a,FXuint opts,FXint x,FXint y,FXint w,FXint h){
      return new FXRbShell(a,opts,x,y,w,h);
      }

    // Construct owned shell window
    FXShell(FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h){
      return new FXRbShell(own,opts,x,y,w,h);
      }
    }

  /// Destroy shell
  virtual ~FXShell();
  };


DECLARE_FXOBJECT_VIRTUALS(FXShell)
DECLARE_FXID_VIRTUALS(FXShell)
DECLARE_FXDRAWABLE_VIRTUALS(FXShell)
DECLARE_FXWINDOW_VIRTUALS(FXShell)

%{
static swig_type_info *FXShell_dynamic_cast(void **ptr) {
    FXShell **ppShell = reinterpret_cast<FXShell **>(ptr);
    FXPopup *pPopup=dynamic_cast<FXPopup*>(*ppShell);
    if(pPopup){
      *ptr=reinterpret_cast<void*>(pPopup);
      return SWIG_TypeQuery("FXPopup *");
      }
    FXToolTip *pToolTip=dynamic_cast<FXToolTip*>(*ppShell);
    if(pToolTip){
      *ptr=reinterpret_cast<void*>(pToolTip);
      return SWIG_TypeQuery("FXToolTip *");
      }
    FXTopWindow *pTopWindow=dynamic_cast<FXTopWindow*>(*ppShell);
    if(pTopWindow){
      *ptr=reinterpret_cast<void*>(pTopWindow);
      return SWIG_TypeQuery("FXTopWindow *");
      }
    return 0;
}
%}

DYNAMIC_CAST(SWIGTYPE_p_FXShell, FXShell_dynamic_cast);
Something went wrong with that request. Please try again.