2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file FormBase.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2000-09-22 15:09:51 +00:00
|
|
|
*
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-09-22 15:09:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "FormBase.h"
|
2002-08-12 14:28:43 +00:00
|
|
|
|
|
|
|
#include "ControlButtons.h"
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "xformsBC.h"
|
2002-05-08 17:52:02 +00:00
|
|
|
#include "xforms_resize.h"
|
2002-02-06 17:15:28 +00:00
|
|
|
#include "Tooltips.h"
|
2002-11-25 18:58:15 +00:00
|
|
|
#include "xforms_helpers.h" // formatted
|
|
|
|
|
|
|
|
#include "gettext.h" // _()
|
|
|
|
#include "BoostFormat.h"
|
2002-09-09 09:49:47 +00:00
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
#include "support/LAssert.h"
|
2002-09-09 09:49:47 +00:00
|
|
|
#include "support/filetools.h" // LibFileSearch
|
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
#include FORMS_H_LOCATION
|
2000-12-04 14:10:44 +00:00
|
|
|
|
2001-09-09 22:02:19 +00:00
|
|
|
extern "C" {
|
2002-02-05 14:59:26 +00:00
|
|
|
|
2002-10-07 10:49:02 +00:00
|
|
|
#if FL_VERSION > 0 || FL_REVISION >= 89
|
2002-11-25 18:58:15 +00:00
|
|
|
|
|
|
|
// These should be in forms.h but aren't
|
|
|
|
void fl_show_tooltip(const char *, int, int);
|
|
|
|
|
2002-10-03 11:25:01 +00:00
|
|
|
void fl_hide_tooltip();
|
2002-11-25 18:58:15 +00:00
|
|
|
|
2002-10-07 10:49:02 +00:00
|
|
|
#endif
|
2002-10-03 11:25:01 +00:00
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
// Callback function invoked by xforms when the dialog is closed by the
|
2002-11-25 18:58:15 +00:00
|
|
|
// window manager.
|
2002-03-11 09:54:42 +00:00
|
|
|
static int C_WMHideCB(FL_FORM * form, void *);
|
2002-02-05 14:59:26 +00:00
|
|
|
|
2002-11-25 18:58:15 +00:00
|
|
|
// Callback function invoked by the xforms pre-handler routine.
|
2002-03-11 09:54:42 +00:00
|
|
|
static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
|
2002-02-05 14:59:26 +00:00
|
|
|
|
|
|
|
} // extern "C"
|
2001-08-29 11:01:05 +00:00
|
|
|
|
2000-10-02 00:10:25 +00:00
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
FormBase::FormBase(string const & t, bool allowResize)
|
2002-11-25 18:58:15 +00:00
|
|
|
: ViewBase(),
|
|
|
|
warning_posted_(false), message_widget_(0),
|
|
|
|
minw_(0), minh_(0), allow_resize_(allowResize),
|
2002-09-30 20:00:42 +00:00
|
|
|
title_(t), icon_pixmap_(0), icon_mask_(0),
|
|
|
|
tooltips_(new Tooltips())
|
2002-03-11 09:54:42 +00:00
|
|
|
{}
|
2002-02-05 14:59:26 +00:00
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
|
|
|
|
FormBase::~FormBase()
|
2002-02-05 17:25:16 +00:00
|
|
|
{
|
2002-09-30 20:00:42 +00:00
|
|
|
if (icon_pixmap_)
|
|
|
|
XFreePixmap(fl_get_display(), icon_pixmap_);
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
delete tooltips_;
|
2002-02-05 17:25:16 +00:00
|
|
|
}
|
2000-10-02 00:10:25 +00:00
|
|
|
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
Tooltips & FormBase::tooltips()
|
2002-02-06 17:15:28 +00:00
|
|
|
{
|
2002-03-11 09:54:42 +00:00
|
|
|
return *tooltips_;
|
2002-02-06 17:15:28 +00:00
|
|
|
}
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
|
2000-11-10 17:29:47 +00:00
|
|
|
void FormBase::redraw()
|
|
|
|
{
|
2000-11-14 02:01:57 +00:00
|
|
|
if (form() && form()->visible)
|
|
|
|
fl_redraw_form(form());
|
2000-11-10 17:29:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
xformsBC & FormBase::bc()
|
|
|
|
{
|
|
|
|
return static_cast<xformsBC &>(getController().bc());
|
|
|
|
// return dynamic_cast<GUIbc &>(controller_ptr_->bc());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-09-30 20:00:42 +00:00
|
|
|
void FormBase::prepare_to_show()
|
2000-09-22 15:09:51 +00:00
|
|
|
{
|
2002-11-08 11:26:45 +00:00
|
|
|
double const scale = get_scale_to_fit(form());
|
2002-09-30 20:00:42 +00:00
|
|
|
if (scale > 1.001)
|
2002-11-08 11:26:45 +00:00
|
|
|
scale_form_horizontally(form(), scale);
|
2002-09-30 20:00:42 +00:00
|
|
|
|
|
|
|
// work around dumb xforms sizing bug
|
|
|
|
minw_ = form()->w;
|
|
|
|
minh_ = form()->h;
|
|
|
|
|
|
|
|
fl_set_form_atclose(form(), C_WMHideCB, 0);
|
|
|
|
|
|
|
|
// set the title for the minimized form
|
|
|
|
if (!getController().IconifyWithMain())
|
|
|
|
fl_winicontitle(form()->window, title_.c_str());
|
|
|
|
|
|
|
|
// assign an icon to the form
|
|
|
|
string const iconname = LibFileSearch("images", "lyx", "xpm");
|
|
|
|
if (!iconname.empty()) {
|
|
|
|
unsigned int w, h;
|
|
|
|
icon_pixmap_ = fl_read_pixmapfile(fl_root,
|
|
|
|
iconname.c_str(),
|
|
|
|
&w,
|
|
|
|
&h,
|
|
|
|
&icon_mask_,
|
|
|
|
0, 0, 0);
|
|
|
|
fl_set_form_icon(form(), icon_pixmap_, icon_mask_);
|
2001-08-28 13:48:40 +00:00
|
|
|
}
|
2002-09-30 20:00:42 +00:00
|
|
|
}
|
2002-01-28 18:42:37 +00:00
|
|
|
|
|
|
|
|
2002-09-30 20:00:42 +00:00
|
|
|
void FormBase::show()
|
|
|
|
{
|
|
|
|
// build() is/should be called from the controller, so form() should
|
|
|
|
// always exist.
|
|
|
|
lyx::Assert(form());
|
2001-03-19 15:38:22 +00:00
|
|
|
|
2002-09-30 20:00:42 +00:00
|
|
|
// we use minw_ to flag whether the dialog has ever been shown.
|
|
|
|
// In turn, prepare_to_show() initialises various bits 'n' pieces
|
|
|
|
// (including minw_).
|
|
|
|
if (minw_ == 0) {
|
|
|
|
prepare_to_show();
|
2000-09-22 15:09:51 +00:00
|
|
|
}
|
2002-01-28 18:42:37 +00:00
|
|
|
|
2002-09-30 20:00:42 +00:00
|
|
|
// make sure the form is up to date.
|
2000-11-14 02:01:57 +00:00
|
|
|
fl_freeze_form(form());
|
2002-09-30 20:00:42 +00:00
|
|
|
update();
|
2000-11-14 02:01:57 +00:00
|
|
|
fl_unfreeze_form(form());
|
2000-09-22 15:09:51 +00:00
|
|
|
|
|
|
|
if (form()->visible) {
|
|
|
|
fl_raise_form(form());
|
2002-01-28 18:42:37 +00:00
|
|
|
/* This XMapWindow() will hopefully ensure that
|
|
|
|
* iconified dialogs are de-iconified. Mad props
|
|
|
|
* out to those crazy Xlib guys for forgetting a
|
|
|
|
* XDeiconifyWindow(). At least WindowMaker, when
|
|
|
|
* being notified of the redirected MapRequest will
|
|
|
|
* specifically de-iconify. From source, fvwm2 seems
|
|
|
|
* to do the same.
|
|
|
|
*/
|
|
|
|
XMapWindow(fl_get_display(), form()->window);
|
2000-09-22 15:09:51 +00:00
|
|
|
} else {
|
2000-10-20 09:50:09 +00:00
|
|
|
// calls to fl_set_form_minsize/maxsize apply only to the next
|
2001-03-15 13:37:04 +00:00
|
|
|
// fl_show_form(), so this comes first.
|
|
|
|
fl_set_form_minsize(form(), minw_, minh_);
|
2001-08-28 13:48:40 +00:00
|
|
|
if (!allow_resize_)
|
|
|
|
fl_set_form_maxsize(form(), minw_, minh_);
|
|
|
|
|
2002-09-09 09:49:47 +00:00
|
|
|
string const maximize_title = "LyX: " + title_;
|
2002-09-30 20:00:42 +00:00
|
|
|
int const iconify_policy =
|
|
|
|
getController().IconifyWithMain() ? FL_TRANSIENT : 0;
|
2002-08-12 14:28:43 +00:00
|
|
|
|
2000-09-22 15:09:51 +00:00
|
|
|
fl_show_form(form(),
|
2002-03-21 16:59:12 +00:00
|
|
|
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
2002-09-09 09:49:47 +00:00
|
|
|
iconify_policy,
|
|
|
|
maximize_title.c_str());
|
2000-09-22 15:09:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormBase::hide()
|
|
|
|
{
|
2002-10-07 10:49:02 +00:00
|
|
|
#if FL_VERSION > 0 || FL_REVISION >= 89
|
2002-10-03 11:25:01 +00:00
|
|
|
// Does no harm if none is visible and ensures that the tooltip form
|
|
|
|
// is hidden should the dialog be closed from the keyboard.
|
|
|
|
fl_hide_tooltip();
|
2002-10-07 10:49:02 +00:00
|
|
|
#endif
|
2002-10-03 11:25:01 +00:00
|
|
|
|
2002-02-28 14:36:23 +00:00
|
|
|
// xforms sometimes tries to process a hint-type MotionNotify, and
|
|
|
|
// use XQueryPointer, without verifying if the window still exists.
|
|
|
|
// So we try to clear out motion events in the queue before the
|
|
|
|
// DestroyNotify
|
|
|
|
XSync(fl_get_display(), false);
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
if (form() && form()->visible)
|
2000-10-13 05:57:05 +00:00
|
|
|
fl_hide_form(form());
|
2000-09-29 06:34:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
void FormBase::setPrehandler(FL_OBJECT * ob)
|
|
|
|
{
|
|
|
|
lyx::Assert(ob);
|
|
|
|
fl_set_object_prehandler(ob, C_PrehandlerCB);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-11-25 18:58:15 +00:00
|
|
|
void FormBase::setMessageWidget(FL_OBJECT * ob)
|
|
|
|
{
|
|
|
|
lyx::Assert(ob && ob->objclass == FL_TEXT);
|
|
|
|
message_widget_ = ob;
|
|
|
|
fl_set_object_lsize(message_widget_, FL_NORMAL_SIZE);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
void FormBase::InputCB(FL_OBJECT * ob, long data)
|
2000-09-22 15:09:51 +00:00
|
|
|
{
|
2001-09-24 10:49:55 +00:00
|
|
|
// It is possible to set the choice to 0 when using the
|
|
|
|
// keyboard shortcuts. This work-around deals with the problem.
|
|
|
|
if (ob && ob->objclass == FL_CHOICE && fl_get_choice(ob) < 1) {
|
|
|
|
fl_set_choice(ob, 1);
|
|
|
|
}
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
bc().input(input(ob, data));
|
2000-09-22 15:09:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-03-20 10:14:03 +00:00
|
|
|
ButtonPolicy::SMInput FormBase::input(FL_OBJECT *, long)
|
|
|
|
{
|
2001-03-21 13:27:03 +00:00
|
|
|
return ButtonPolicy::SMI_VALID;
|
2001-03-20 10:14:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-11-25 18:58:15 +00:00
|
|
|
// preemptive handler for feedback messages
|
|
|
|
void FormBase::MessageCB(FL_OBJECT * ob, int event)
|
|
|
|
{
|
|
|
|
lyx::Assert(ob);
|
|
|
|
|
|
|
|
switch (event) {
|
|
|
|
case FL_ENTER:
|
|
|
|
{
|
|
|
|
string const feedback = getFeedback(ob);
|
|
|
|
if (feedback.empty() && warning_posted_)
|
|
|
|
break;
|
|
|
|
|
|
|
|
warning_posted_ = false;
|
|
|
|
postMessage(getFeedback(ob));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case FL_LEAVE:
|
|
|
|
if (!warning_posted_)
|
|
|
|
clearMessage();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormBase::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
|
|
|
{
|
|
|
|
lyx::Assert(ob);
|
|
|
|
|
|
|
|
if (ob->objclass == FL_INPUT && event == FL_PUSH && key == 2) {
|
|
|
|
// Trigger an input event when pasting in an xforms input object
|
|
|
|
// using the middle mouse button.
|
|
|
|
InputCB(ob, 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (event != FL_ENTER && event != FL_LEAVE)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (ob->objclass == FL_TABFOLDER) {
|
|
|
|
// This prehandler is used to work-around an xforms bug and
|
|
|
|
// ensures that the form->x, form->y coords of the active
|
|
|
|
// tabfolder are up to date.
|
|
|
|
|
|
|
|
// The tabfolder itself can be very narrow, being just
|
|
|
|
// the visible border to the tabs.
|
|
|
|
// We thus use both FL_ENTER and FL_LEAVE as flags,
|
|
|
|
// in case the FL_ENTER event is not caught.
|
|
|
|
|
|
|
|
FL_FORM * const folder = fl_get_active_folder(ob);
|
|
|
|
if (folder && folder->window) {
|
|
|
|
fl_get_winorigin(folder->window,
|
|
|
|
&(folder->x), &(folder->y));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (message_widget_) {
|
|
|
|
// Post feedback as the mouse enters the object,
|
|
|
|
// remove it as the mouse leaves.
|
|
|
|
MessageCB(ob, event);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if FL_VERSION > 0 || FL_REVISION >= 89
|
|
|
|
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
|
|
|
// This is a work-around:
|
|
|
|
if (ob->objclass == FL_BROWSER) {
|
|
|
|
if (event == FL_ENTER && ob->tooltip && *(ob->tooltip)) {
|
|
|
|
fl_show_tooltip(ob->tooltip, ob->form->x + ob->x,
|
|
|
|
ob->form->y + ob->y + ob->h + 1);
|
|
|
|
} else if (event == FL_LEAVE) {
|
|
|
|
fl_hide_tooltip();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormBase::postWarning(string const & warning)
|
|
|
|
{
|
|
|
|
warning_posted_ = true;
|
|
|
|
postMessage(warning);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormBase::clearMessage()
|
|
|
|
{
|
|
|
|
lyx::Assert(message_widget_);
|
|
|
|
|
|
|
|
warning_posted_ = false;
|
|
|
|
|
|
|
|
string const existing = message_widget_->label
|
|
|
|
? message_widget_->label : string();
|
|
|
|
if (existing.empty())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// This trick is needed to get xforms to clear the label...
|
|
|
|
fl_set_object_label(message_widget_, "");
|
|
|
|
fl_hide_object(message_widget_);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormBase::postMessage(string const & message)
|
|
|
|
{
|
|
|
|
lyx::Assert(message_widget_);
|
|
|
|
|
2002-11-25 19:17:42 +00:00
|
|
|
int const width = message_widget_->w - 10;
|
2002-11-25 18:58:15 +00:00
|
|
|
#if USE_BOOST_FORMAT
|
|
|
|
boost::format fmter = warning_posted_ ?
|
|
|
|
boost::format(_("WARNING! %1$s")) :
|
|
|
|
boost::format("%1$s");
|
|
|
|
|
|
|
|
string const str = formatted(boost::io::str(fmter % message),
|
|
|
|
width, FL_NORMAL_SIZE);
|
|
|
|
#else
|
|
|
|
string const tmp = warning_posted_ ?
|
|
|
|
_("WARNING!") + string(" ") + message :
|
|
|
|
message;
|
|
|
|
|
|
|
|
string const str = formatted(tmp, width, FL_NORMAL_SIZE);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
fl_set_object_label(message_widget_, str.c_str());
|
|
|
|
FL_COLOR const label_color = warning_posted_ ? FL_RED : FL_LCOL;
|
|
|
|
fl_set_object_lcol(message_widget_, label_color);
|
|
|
|
|
|
|
|
if (!message_widget_->visible)
|
|
|
|
fl_show_object(message_widget_);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-03-20 01:22:46 +00:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
FormBase * GetForm(FL_OBJECT * ob)
|
2000-09-22 15:09:51 +00:00
|
|
|
{
|
2001-04-24 15:25:26 +00:00
|
|
|
lyx::Assert(ob && ob->form && ob->form->u_vdata);
|
2002-03-11 09:54:42 +00:00
|
|
|
FormBase * ptr = static_cast<FormBase *>(ob->form->u_vdata);
|
|
|
|
return ptr;
|
2000-09-22 15:09:51 +00:00
|
|
|
}
|
|
|
|
|
2001-03-20 01:22:46 +00:00
|
|
|
} // namespace anon
|
|
|
|
|
2000-09-22 15:09:51 +00:00
|
|
|
|
2001-09-09 22:02:19 +00:00
|
|
|
extern "C" {
|
2002-01-28 18:42:37 +00:00
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
void C_FormBaseApplyCB(FL_OBJECT * ob, long)
|
|
|
|
{
|
2002-08-12 14:28:43 +00:00
|
|
|
GetForm(ob)->getController().ApplyButton();
|
2002-02-05 14:59:26 +00:00
|
|
|
}
|
2000-09-22 15:09:51 +00:00
|
|
|
|
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
void C_FormBaseOKCB(FL_OBJECT * ob, long)
|
|
|
|
{
|
2002-08-12 14:28:43 +00:00
|
|
|
GetForm(ob)->getController().OKButton();
|
2002-02-05 14:59:26 +00:00
|
|
|
}
|
2000-10-13 05:57:05 +00:00
|
|
|
|
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
void C_FormBaseCancelCB(FL_OBJECT * ob, long)
|
|
|
|
{
|
|
|
|
FormBase * form = GetForm(ob);
|
2002-08-12 14:28:43 +00:00
|
|
|
form->getController().CancelButton();
|
2002-02-05 14:59:26 +00:00
|
|
|
}
|
2000-10-13 05:57:05 +00:00
|
|
|
|
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
|
|
|
|
{
|
2002-08-12 14:28:43 +00:00
|
|
|
GetForm(ob)->getController().RestoreButton();
|
2002-02-05 14:59:26 +00:00
|
|
|
}
|
2000-10-13 05:57:05 +00:00
|
|
|
|
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
void C_FormBaseInputCB(FL_OBJECT * ob, long d)
|
|
|
|
{
|
|
|
|
GetForm(ob)->InputCB(ob, d);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
static int C_WMHideCB(FL_FORM * form, void *)
|
2002-02-05 17:25:16 +00:00
|
|
|
{
|
|
|
|
// Close the dialog cleanly, even if the WM is used to do so.
|
|
|
|
lyx::Assert(form && form->u_vdata);
|
2002-03-11 09:54:42 +00:00
|
|
|
FormBase * ptr = static_cast<FormBase *>(form->u_vdata);
|
2002-08-12 14:28:43 +00:00
|
|
|
ptr->getController().CancelButton();
|
2002-02-05 17:25:16 +00:00
|
|
|
return FL_CANCEL;
|
|
|
|
}
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
static int C_PrehandlerCB(FL_OBJECT * ob, int event,
|
|
|
|
FL_Coord, FL_Coord, int key, void *)
|
2002-02-05 14:59:26 +00:00
|
|
|
{
|
|
|
|
// Note that the return value is important in the pre-emptive handler.
|
|
|
|
// Don't return anything other than 0.
|
|
|
|
lyx::Assert(ob);
|
|
|
|
|
|
|
|
// Don't Assert this one, as it can happen quite naturally when things
|
|
|
|
// are being deleted in the d-tor.
|
|
|
|
//Assert(ob->form);
|
|
|
|
if (!ob->form) return 0;
|
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
FormBase * ptr = static_cast<FormBase *>(ob->form->u_vdata);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-03-11 09:54:42 +00:00
|
|
|
if (ptr)
|
|
|
|
ptr->PrehandlerCB(ob, event, key);
|
2001-08-29 11:01:05 +00:00
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
return 0;
|
2001-08-29 11:01:05 +00:00
|
|
|
}
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-02-05 14:59:26 +00:00
|
|
|
} // extern "C"
|