// -*- c++ -*-
//  Generated by gtkmmproc from ./applet.gen_h -- DO NOT MODIFY!
#ifndef _GNOMEMM_APPLET_H
#define _GNOMEMM_APPLET_H

/* $Id: applet.gen_h,v 1.7 2002/01/07 20:16:01 cactus Exp $ -*- c++ -*- */


/* applet.gen_h
 *
 * Copyright (C) 1999-2001 Gergõ ÉRDI <cactus@cactus.rulez.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk--/plug.h>
#include <applet-widget.h>

namespace Gnome {
class Applet;
class Applet_Class;
}
namespace Gtk { Gnome::Applet *wrap (AppletWidget *o); }
namespace Gnome
{
class Applet : public Gtk::Plug
{

public:
  typedef Applet          CppObjectType;
  typedef Applet_Class    CppClassType;
  typedef AppletWidget           BaseObjectType;
  typedef AppletWidgetClass      BaseClassType;

private:
  friend class Applet_Class;
  static CppClassType applet_class;

  Applet(const Applet&);
  Applet& operator=(const Applet&); // not implemented

protected:
  void   initialize_class();
  explicit Applet(AppletWidget *castitem);

public:
  static GtkType get_type();
  AppletWidget* gtkobj()             { return (AppletWidget*)(gtkobject); }
  const AppletWidget* gtkobj() const { return (AppletWidget*)(gtkobject); }
  static bool isA(Gtk::Object *checkcast);

  // Hook for proxies
  static const char* const signal_names[];

  virtual ~Applet();

private:

public:



    //: Create a new panel applet
    //- You can later add a widget to it with the {Applet::add()}
    //- method. The {\param goad_id} argument is a unique Gtk::string
    //- identifier of the applet.
    Applet(const Gtk::string& goad_id);

    //: Set the tooltip displayed for the applet
    //- This tooltip is displayed when the user rests the pointer
    //- above anywhere on the applet.


  void set_tooltip(const Gtk::nstring& text);

    //: Set the tooltip displayed for a child widget




  void set_widget_tooltip(Gtk::Widget& widget,const Gtk::nstring& text);

    //: Add a widget to the applet container

  void add(Gtk::Widget& widget);

    //: Remove the applet's child widget

  void remove();


  void sync_config();

    //: Abort applet before it's added to the panel

  void abort_load();

    //: Add a menu item to the applet's context menu
    //- {\param Name} is the ID to use later when removing the widget.
    //-
    //- To add a menuitem to a submenu created with {\method
    //- add_submenu} or {\method add_submenu_stock}, set the
    //- {\param name} argument to a "path" to the submenu.
    //- e.g. to add the menu item "General" to the previously
    //- created submenu "Settings", use
    //- add_menuitem("settings/general", "General", slot(...));
    void add_menuitem(const Gtk::string& name,
		      const Gtk::string& caption,
		      SigC::Slot0<void> callback);

    void add_menuitem_stock(const Gtk::string& name,
			    const Gtk::string& stock_type,
			    const Gtk::string& caption,
			    SigC::Slot0<void> callback);

    //: Remove a menu item


  void remove_menuitem(const Gtk::string& name);

    //: Set the sensitivity of a menu item




  void set_menu_sensitive(const Gtk::string& name,bool sensitive);

    // Submenu functions
    //: Add a submenu to the applet's context menu
    //- You can later add menu items and/or more submenus to it
    //- using it's {\param name} parameter (see {\method
    //- add_menuitem})




  void add_submenu(const Gtk::string& name,const Gtk::string& caption);

  void add_submenu_stock(const Gtk::string& name,const Gtk::string& stock_type,const Gtk::string& caption);

    //: Remove a submenu


  void remove_submenu(const Gtk::string& name);

    // General panel functions

    //: Get the orientation of the panel the applet is currently in

  GNOME_Panel_OrientType get_panel_orient();

    //: Get the screen size (in pixels) the applet should use

  int get_panel_pixel_size();

  void get_rgb_bg(guchar** rgb,int& w,int& h,int& rowstride);


    // Signals

    //: Set if the applet gets do_draw signals


  void send_position(bool enable);


  void send_draw(bool enable);

    //: The orientation of the panel containing the widget has changed



    //: The size allocated to the applet has changed



    //: The applet's position has been changed
    //- The two parameters are the X and Y coordinates.



    //: The session manager exits the panel



    //: Panel background has changed

protected:
    static void _fw_signal(AppletWidget*, gpointer data);

public:

  union
    {
      CppObjectType * applet_self;
      Gtk::ProxySignal1<void,GNOME_Panel_OrientType,CppObjectType,BaseObjectType,0> change_orient;
      Gtk::ProxySignal1<void,int,CppObjectType,BaseObjectType,1> change_pixel_size;
      Gtk::ProxySignal2<void,int,int,CppObjectType,BaseObjectType,2> change_position;
      Gtk::ProxySignal2<int,char*,char*,CppObjectType,BaseObjectType,3> save_session;
      Gtk::ProxySignal3<void,GNOME_Panel_BackType,char*,GdkColor*,CppObjectType,BaseObjectType,4> back_change;
      Gtk::ProxySignal1<void,int,CppObjectType,BaseObjectType,5> tooltip_state;
      Gtk::ProxySignal0<void,CppObjectType,BaseObjectType,6> do_draw;
    };

protected:
  // impl functions
    virtual void change_orient_impl(GNOME_Panel_OrientType p0);
    virtual void change_pixel_size_impl(int p0);
    virtual void change_position_impl(int p0,int p1);
    virtual int save_session_impl(char* p0,char* p1);
    virtual void back_change_impl(GNOME_Panel_BackType p0,char* p1,GdkColor* p2);
    virtual void tooltip_state_impl(int p0);
    virtual void do_draw_impl();

};



}


#endif
