/*
 *  WindowMaker window manager
 * 
 *  Copyright (c) 1997 Alfredo K. Kojima
 * 
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef WMBUTTON_H_
#define WMBUTTON_H_ 

/* internal buttons */
#define WBUT_CLOSE		0
#define WBUT_BROKENCLOSE	1
#define WBUT_ICONIFY		2
#define WBUT_LAST		3
/*
#define WBUT_MAXIMIZE		3
*/


#include "wcore.h"
#include "pixmap.h"


typedef struct WButton {
    WCoreWindow *core;
    WPixmap *image;		       /* image label */
    WTexture *texture;		       /* texture for normal state */
    WTexData texture_data;
    WTexture *alt_texture;	       /* texture for pushed state */
    WTexData alt_texture_data;
    GC label_gc;		       /* GC to display label with */
    char *label;		       /* text to display in button */
    int pushed:1;
#ifdef NEWSTYLE
    WPixmap *image1;		       /* image label for foc. */
    WPixmap *image2;		       /* image label for unfoc.*/
#endif    
} WButton;


extern WMethodTable wButtonMethods;


WButton *wButtonCreate(WCoreWindow *core, int x, int y, 
		       int width, int height);
void wButtonDestroy(WButton *wbut);

void wButtonPaint(WButton *wbut, int repaint);



#endif
