/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
*
* (C) 2002,2005 by Marcin Dalecki <martin@dalecki.de>
*
* MARCIN DALECKI ASSUMES NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY
* OF THIS SOFTWARE . THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, AND MARCIN DALECKI EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES,
* INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/*
* Enhanced Motif PushButton widget with move over behavior.
*/
#include "vim.h"
#ifdef FEAT_TOOLBAR
#include <Xm/XmP.h>
#include <Xm/DrawP.h>
#if defined(HAVE_XM_TRAITP_H) && defined(HAVE_XM_MANAGER_H) \
&& defined(HAVE_XM_UNHIGHLIGHT_H) && defined(HAVE_XM_XPMP_H)
# include <Xm/TraitP.h>
# include <Xm/Manager.h>
# include <Xm/UnhighlightT.h>
# include <Xm/XpmP.h>
# define UNHIGHLIGHTT
#else
# include <X11/xpm.h>
#endif
#include <Xm/ManagerP.h>
#include <Xm/Display.h>
#include <Xm/DisplayP.h>
#include <X11/Shell.h>
#include <X11/ShellP.h>
#include "gui_xmebwp.h"
/* Provide some missing wrappers, which are missed from the LessTif
* implementation.
*
* We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
* pixmap will not appear in it's caches properly. We cache the interresting
* values in XmEnhancedButtonPart instead ourself.
*/
#ifdef LESSTIF_VERSION
# ifndef Lab_IsMenupane
# define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \
Lab_MenuType(w) == (int)XmMENU_PULLDOWN)
# endif
# define XmeClearBorder _XmClearBorder
# define XmeDrawShadows _XmDrawShadows
# define XmeDrawHighlight(a, b, c, d, e, f, g, h) \
_XmDrawHighlight(a, b, c, d, e, f, g, h, LineSolid)
#endif
/*
* Motif internals we have to cheat around with.
*/
/* Hopefully this will never change... */
#ifndef XmFOCUS_IGNORE
# define XmFOCUS_IGNORE 1<<1
#endif
extern Boolean _XmGetInDragMode(Widget widget);
extern void _XmPrimitiveEnter(Widget wid,
XEvent * event,
String * params, Cardinal * num_params);
extern void _XmPrimitiveLeave(Widget wid,
XEvent * event,
String * params, Cardinal * num_params);
extern void _XmSetFocusFlag(Widget w, unsigned int mask, Boolean value);
extern void _XmCalcLabelDimensions(Widget wid);
/*
* Declaration of class methods.
*/
static void Destroy(Widget w);
static