add the config header and emacs comment to all the .cc's

This commit is contained in:
Dana Jansens 2002-11-17 09:41:58 +00:00
parent 638d4e6f19
commit 1d897f432e
21 changed files with 119 additions and 20 deletions

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "application.hh"
#include "eventhandler.hh"
#include "widget.hh"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "appwidget.hh"
#include "application.hh"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "button.hh"
namespace otk {

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "eventdispatcher.hh"
#include "display.hh"
#include <iostream>

View file

@ -28,6 +28,8 @@ private:
OtkEventMap _map;
OtkEventHandler *_fallback;
//! The time at which the last XEvent with a time was received
Time _lasttime; // XXX: store this! also provide an accessor!
};
}

View file

@ -1,5 +1,11 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "display.hh"
#include "eventhandler.hh"
#include <iostream>
namespace otk {
@ -78,7 +84,19 @@ void OtkEventHandler::handle(const XEvent &e)
return selectionHandler(e.xselection);
case SelectionRequest:
return selectionRequestHandler(e.xselectionrequest);
};
default:
#ifdef SHAPE
if (e.type == otk::OBDisplay::shapeEventBase())
return shapeHandler((*(XShapeEvent*)&e));
#endif // SHAPE
;
}
}
void OtkEventHandler::clientMessageHandler(const XClientMessageEvent &)
{
}
}

View file

@ -3,6 +3,10 @@
extern "C" {
#include <X11/Xlib.h>
#ifdef SHAPE
#include <X11/extensions/shape.h>
#endif // SHAPE
}
namespace otk {
@ -93,9 +97,6 @@ public:
//! Called when the colormap changes, or is installed or unistalled
virtual void colorMapHandler(const XColormapEvent &) {}
//! Called when a client calls XSendEvent
virtual void clientMessageHandler(const XClientMessageEvent &) {}
//! Called when a property of a window changes
virtual void propertyHandler(const XPropertyEvent &) {}
@ -108,6 +109,18 @@ public:
//! Called when a SelectionEvent occurs
virtual void selectionRequestHandler(const XSelectionRequestEvent &) {}
//! Called when a client calls XSendEvent
/*!
Some types of client messages are filtered out and sent to more specific
event handler functions.
*/
virtual void clientMessageHandler(const XClientMessageEvent &);
#if defined(SHAPE) || defined(DOXYGEN_IGNORE)
//! Called when a shape extention event fires
virtual void shapeHandler(const XShapeEvent &) {};
#endif // SHAPE
virtual ~OtkEventHandler();
protected:

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "focuslabel.hh"
namespace otk {

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "focuswidget.hh"
namespace otk {

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "label.hh"
namespace otk {

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "application.hh"
#include "focuswidget.hh"
#include "appwidget.hh"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "rect.hh"
namespace otk {

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,6 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif // HAVE_CONFIG_H
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include <assert.h>
#include <iostream>

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,4 +1,4 @@
// -*- mode: C++; indent-tabs-mode: nil; -*-
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"

View file

@ -1,3 +1,9 @@
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif // HAVE_CONFIG_H
#include "widget.hh"
#include "display.hh"
#include "assassin.hh"

View file

@ -1,9 +1,6 @@
#ifndef __widget_hh
#define __widget_hh
#include <string>
#include <list>
#include "rect.hh"
#include "point.hh"
#include "texture.hh"
@ -11,6 +8,13 @@
#include "eventdispatcher.hh"
#include "application.hh"
extern "C" {
#include <assert.h>
}
#include <string>
#include <list>
namespace otk {
class OtkWidget : public OtkEventHandler {
@ -78,10 +82,10 @@ public:
virtual void removeChild(OtkWidget *child);
inline bool isStretchableHorz(void) const { return _stretchable_horz; }
void setStretchableHorz(bool s_horz) { _stretchable_horz = s_horz; }
void setStretchableHorz(bool s_horz = true) { _stretchable_horz = s_horz; }
inline bool isStretchableVert(void) const { return _stretchable_vert; }
void setStretchableVert(bool s_vert) { _stretchable_vert = s_vert; }
void setStretchableVert(bool s_vert = true) { _stretchable_vert = s_vert; }
inline Cursor getCursor(void) const { return _cursor; }
@ -93,7 +97,7 @@ public:
void setDirection(Direction dir) { _direction = dir; }
inline Style *getStyle(void) const { return _style; }
void setStyle(Style *style) { _style = style; }
void setStyle(Style *style) { assert(style); _style = style; }
inline OtkEventDispatcher *getEventDispatcher(void)
{ return _event_dispatcher; }