mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
A bunch of obvious changes to please strict ansi compilers. Not finished.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@210 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
734751b383
commit
c35b288b74
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
1999-10-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/mathed/math_symbols.C, src/support/lstrings.C,
|
||||
src/support/lyxstring.C: add `using' directive to specify what
|
||||
we need in <algorithm>. I do not think that we need to
|
||||
conditionalize this, but any thought is appreciated.
|
||||
|
||||
* many files: change all callback functions to "C" linkage
|
||||
functions to please strict C++ compilers like DEC cxx 6.1 in mode
|
||||
strict_ansi. Those who were static are now global.
|
||||
The case of callbacks which are static class members is
|
||||
trickier, since we have to make C wrappers around them (see
|
||||
InsetError, InsetInfo and InsetUrl). The same holds for friends. I
|
||||
did not finish this yet, since it defeats the purpose of
|
||||
encapsulation, and I am not sure what the best route is.
|
||||
|
||||
1999-10-19 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/support/lyxstring.C (lyxstring): we permit to have a null
|
||||
|
@ -717,7 +717,7 @@ char const *LyXAction::helpText(kb_action action) const
|
||||
|
||||
|
||||
// Function to compare items from the attrib table.
|
||||
int actioncomp(const void *a, const void *b)
|
||||
extern "C" int actioncomp(const void *a, const void *b)
|
||||
{
|
||||
int const *ia=(int const*)a, *ib=(int const*)b;
|
||||
return (*ia)-(*ib);
|
||||
|
@ -32,8 +32,8 @@ typedef struct {
|
||||
} BMTABLE_SPEC;
|
||||
|
||||
|
||||
static int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
||||
FL_Coord my, int key, void *xev);
|
||||
extern "C" int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
||||
FL_Coord my, int key, void *xev);
|
||||
|
||||
|
||||
FL_OBJECT *fl_create_bmtable(int type, FL_Coord x, FL_Coord y,
|
||||
@ -165,8 +165,8 @@ static void draw_bitmaptable(FL_OBJECT *ob)
|
||||
}
|
||||
|
||||
|
||||
static int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
||||
FL_Coord my, int key, void */*xev*/)
|
||||
extern "C" int handle_bitmaptable(FL_OBJECT *ob, int event, FL_Coord mx,
|
||||
FL_Coord my, int key, void */*xev*/)
|
||||
{
|
||||
int i, j;
|
||||
BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec;
|
||||
|
@ -4,14 +4,14 @@
|
||||
#define FD_form_bullet_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void ChoiceBulletSizeCB(FL_OBJECT *, long);
|
||||
extern void BulletOKCB(FL_OBJECT *, long);
|
||||
extern void BulletApplyCB(FL_OBJECT *, long);
|
||||
extern void BulletCancelCB(FL_OBJECT *, long);
|
||||
extern void InputBulletLaTeXCB(FL_OBJECT *, long);
|
||||
extern void BulletDepthCB(FL_OBJECT *, long);
|
||||
extern void BulletPanelCB(FL_OBJECT *, long);
|
||||
extern void BulletBMTableCB(FL_OBJECT *, long);
|
||||
extern "C" void ChoiceBulletSizeCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletOKCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void InputBulletLaTeXCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletDepthCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletPanelCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletBMTableCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Additional routines ****/
|
||||
|
@ -4,9 +4,9 @@
|
||||
#define FD_form_credits_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void CreditsOKCB(FL_OBJECT *, long);
|
||||
extern "C" void CreditsOKCB(FL_OBJECT *, long);
|
||||
|
||||
extern void CopyrightOKCB(FL_OBJECT *, long);
|
||||
extern "C" void CopyrightOKCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
18
src/form1.h
18
src/form1.h
@ -5,18 +5,18 @@
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
|
||||
extern void GraphicsCB(FL_OBJECT *, long);
|
||||
extern "C" void GraphicsCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
extern void TableOKCB(FL_OBJECT *, long);
|
||||
extern void TableApplyCB(FL_OBJECT *, long);
|
||||
extern void TableCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void TableOKCB(FL_OBJECT *, long);
|
||||
extern "C" void TableApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void TableCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void SearchForwardCB(FL_OBJECT *, long);
|
||||
extern void SearchBackwardCB(FL_OBJECT *, long);
|
||||
extern void SearchReplaceCB(FL_OBJECT *, long);
|
||||
extern void SearchCancelCB(FL_OBJECT *, long);
|
||||
extern void SearchReplaceAllCB(FL_OBJECT *, long);
|
||||
extern "C" void SearchForwardCB(FL_OBJECT *, long);
|
||||
extern "C" void SearchBackwardCB(FL_OBJECT *, long);
|
||||
extern "C" void SearchReplaceCB(FL_OBJECT *, long);
|
||||
extern "C" void SearchCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void SearchReplaceAllCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
/**** Callback routines ****/
|
||||
|
||||
extern void include_cb(FL_OBJECT *, long);
|
||||
extern "C" void include_cb(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
@ -60,8 +60,8 @@ extern BufferView *current_view;
|
||||
static volatile bool alarmed;
|
||||
|
||||
extern FL_OBJECT *figinset_canvas;
|
||||
inline
|
||||
void waitalarm(int)
|
||||
//inline
|
||||
extern "C" void waitalarm(int)
|
||||
{
|
||||
alarmed = true;
|
||||
}
|
||||
@ -136,7 +136,7 @@ void addpidwait(int pid)
|
||||
}
|
||||
|
||||
|
||||
int GhostscriptMsg(FL_OBJECT *, Window, int, int,
|
||||
extern "C" int GhostscriptMsg(FL_OBJECT *, Window, int, int,
|
||||
XEvent *ev, void *)
|
||||
{
|
||||
int i;
|
||||
|
@ -27,12 +27,11 @@ static Combox *bibcombox = 0;
|
||||
|
||||
extern void UpdateInset(Inset* inset, bool mark_dirty = true);
|
||||
void BibitemUpdate(Combox *);
|
||||
void bibitem_cb(FL_OBJECT *, long);
|
||||
FD_citation_form * create_form_citation_form(void);
|
||||
FD_bibitem_form * create_form_bibitem_form(void);
|
||||
|
||||
|
||||
void bibitem_cb(FL_OBJECT *, long data)
|
||||
extern "C" void bibitem_cb(FL_OBJECT *, long data)
|
||||
{
|
||||
switch (data) {
|
||||
// case 0: fl_hide_form(citation_form->citation_form);
|
||||
|
@ -150,6 +150,13 @@ void InsetError::CloseErrorCB(FL_OBJECT *, long data)
|
||||
}
|
||||
}
|
||||
|
||||
// A C wrapper
|
||||
extern "C" void C_InsetError_CloseErrorCB(FL_OBJECT *, long data)
|
||||
{
|
||||
InsetError::CloseErrorCB(0,data);
|
||||
}
|
||||
|
||||
|
||||
void InsetError::Edit(int, int)
|
||||
{
|
||||
if (!form) {
|
||||
@ -159,7 +166,7 @@ void InsetError::Edit(int, int)
|
||||
fl_set_object_color(strobj,FL_MCOL,FL_MCOL);
|
||||
fl_set_object_gravity(strobj, FL_NorthWest, FL_SouthEast);
|
||||
obj = fl_add_button(FL_RETURN_BUTTON,140,200,120,30,_("Close"));
|
||||
fl_set_object_callback(obj, CloseErrorCB, (long)this);
|
||||
fl_set_object_callback(obj, C_InsetError_CloseErrorCB, (long)this);
|
||||
fl_set_object_gravity(obj, FL_South, FL_South);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_end_form();
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
Inset::Code LyxCode() const { return Inset::NO_CODE; }
|
||||
/// We don't want "begin" and "end inset" in lyx-file
|
||||
bool DirectWrite() const { return true; };
|
||||
///
|
||||
static void CloseErrorCB(FL_OBJECT *, long data);
|
||||
private:
|
||||
///
|
||||
string contents;
|
||||
@ -74,7 +76,5 @@ private:
|
||||
FL_FORM *form;
|
||||
///
|
||||
FL_OBJECT *strobj;
|
||||
///
|
||||
static void CloseErrorCB(FL_OBJECT *, long data);
|
||||
};
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ FD_include *create_form_include(void)
|
||||
|
||||
FD_include *form = 0;
|
||||
|
||||
void include_cb(FL_OBJECT *, long arg)
|
||||
extern "C" void include_cb(FL_OBJECT *, long arg)
|
||||
{
|
||||
|
||||
InsetInclude *inset = (InsetInclude*)form->vdata;
|
||||
|
@ -20,8 +20,7 @@ extern void UpdateInset(Inset* inset, bool mark_dirty = true);
|
||||
|
||||
FD_index_form *index_form = 0;
|
||||
|
||||
static
|
||||
void index_cb(FL_OBJECT *, long data)
|
||||
extern "C" void index_cb(FL_OBJECT *, long data)
|
||||
{
|
||||
InsetIndex *inset = (InsetIndex*)index_form->vdata;
|
||||
|
||||
|
@ -170,6 +170,11 @@ void InsetInfo::CloseInfoCB(FL_OBJECT *, long data)
|
||||
}
|
||||
}
|
||||
|
||||
// This is just a wrapper.
|
||||
extern "C" void C_InsetInfo_CloseInfoCB(FL_OBJECT *, long data)
|
||||
{
|
||||
InsetInfo::CloseInfoCB(0, data);
|
||||
}
|
||||
|
||||
void InsetInfo::Edit(int, int)
|
||||
{
|
||||
@ -186,7 +191,7 @@ void InsetInfo::Edit(int, int)
|
||||
obj = fl_add_button(FL_NORMAL_BUTTON,130,140,120,30,idex(_("Close|#C^[")));
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_gravity(obj, SouthWestGravity, SouthEastGravity);
|
||||
fl_set_object_callback(obj, CloseInfoCB, (long)this);
|
||||
fl_set_object_callback(obj, C_InsetInfo_CloseInfoCB, (long)this);
|
||||
fl_set_object_shortcut(obj, scex(_("Close|#C^[")), (long)this);
|
||||
fl_end_form();
|
||||
fl_set_form_atclose(form, CancelCloseBoxCB, 0);
|
||||
|
@ -65,6 +65,8 @@ public:
|
||||
Inset::Code LyxCode() const;
|
||||
///
|
||||
Inset* Clone();
|
||||
///
|
||||
static void CloseInfoCB(FL_OBJECT *, long data);
|
||||
private:
|
||||
///
|
||||
string contents;
|
||||
@ -72,8 +74,6 @@ private:
|
||||
FL_FORM *form;
|
||||
///
|
||||
FL_OBJECT *strobj;
|
||||
///
|
||||
static void CloseInfoCB(FL_OBJECT *, long data);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -99,6 +99,10 @@ void InsetUrl::CloseUrlCB(FL_OBJECT *ob, long)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT *ob, long)
|
||||
{
|
||||
InsetUrl::CloseUrlCB(0,0);
|
||||
}
|
||||
|
||||
void InsetUrl::Edit(int, int)
|
||||
{
|
||||
@ -116,7 +120,7 @@ void InsetUrl::Edit(int, int)
|
||||
obj = fl_add_button(FL_RETURN_BUTTON,360,130,100,30,idex(_("Close|#C^[^M")));
|
||||
fl_set_button_shortcut(obj,scex(_("Close|#C^[^M")),1);
|
||||
obj->u_vdata = this;
|
||||
fl_set_object_callback(obj,CloseUrlCB,0);
|
||||
fl_set_object_callback(obj,C_InsetUrl_CloseUrlCB,0);
|
||||
radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON,50,130,240,30,idex(_("HTML type|#H")));
|
||||
fl_set_button_shortcut(obj,scex(_("HTML type|#H")),1);
|
||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
||||
|
@ -74,6 +74,8 @@ public:
|
||||
int Linuxdoc(string &file);
|
||||
///
|
||||
int DocBook(string &file);
|
||||
///
|
||||
static void CloseUrlCB(FL_OBJECT *, long data);
|
||||
private:
|
||||
///
|
||||
Url_Flags flag;
|
||||
@ -85,8 +87,6 @@ private:
|
||||
FL_OBJECT *name_name;
|
||||
///
|
||||
FL_OBJECT *radio_html;
|
||||
///
|
||||
static void CloseUrlCB(FL_OBJECT *, long data);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -4,12 +4,12 @@
|
||||
#define FD_LaTeXOptions_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void LaTeXOptionsOK(FL_OBJECT *, long);
|
||||
extern void LaTeXOptionsApply(FL_OBJECT *, long);
|
||||
extern void LaTeXOptionsCancel(FL_OBJECT *, long);
|
||||
extern "C" void LaTeXOptionsOK(FL_OBJECT *, long);
|
||||
extern "C" void LaTeXOptionsApply(FL_OBJECT *, long);
|
||||
extern "C" void LaTeXOptionsCancel(FL_OBJECT *, long);
|
||||
|
||||
extern void LatexLogClose(FL_OBJECT *, long);
|
||||
extern void LatexLogUpdate(FL_OBJECT *, long);
|
||||
extern "C" void LatexLogClose(FL_OBJECT *, long);
|
||||
extern "C" void LatexLogUpdate(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
@ -4,47 +4,47 @@
|
||||
#define FD_form_document_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void ChoiceClassCB(FL_OBJECT *, long);
|
||||
extern void DocumentCancelCB(FL_OBJECT *, long);
|
||||
extern void DocumentApplyCB(FL_OBJECT *, long);
|
||||
extern void DocumentOKCB(FL_OBJECT *, long);
|
||||
extern void DocumentDefskipCB(FL_OBJECT *, long);
|
||||
extern void DocumentSpacingCB(FL_OBJECT *, long);
|
||||
extern void DocumentBulletsCB(FL_OBJECT *, long);
|
||||
extern "C" void ChoiceClassCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentOKCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentDefskipCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentSpacingCB(FL_OBJECT *, long);
|
||||
extern "C" void DocumentBulletsCB(FL_OBJECT *, long);
|
||||
|
||||
extern void CharacterApplyCB(FL_OBJECT *, long);
|
||||
extern void CharacterCloseCB(FL_OBJECT *, long);
|
||||
extern "C" void CharacterApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void CharacterCloseCB(FL_OBJECT *, long);
|
||||
|
||||
extern void ParagraphOKCB(FL_OBJECT *, long);
|
||||
extern void ParagraphApplyCB(FL_OBJECT *, long);
|
||||
extern void ParagraphCancelCB(FL_OBJECT *, long);
|
||||
extern void ParagraphVSpaceCB(FL_OBJECT *, long);
|
||||
extern void ParagraphExtraOpen(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphOKCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphVSpaceCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphExtraOpen(FL_OBJECT *, long);
|
||||
|
||||
extern void PreambleOKCB(FL_OBJECT *, long);
|
||||
extern void PreambleApplyCB(FL_OBJECT *, long);
|
||||
extern void PreambleCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void PreambleOKCB(FL_OBJECT *, long);
|
||||
extern "C" void PreambleApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void PreambleCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void QuotesOKCB(FL_OBJECT *, long);
|
||||
extern void QuotesApplyCB(FL_OBJECT *, long);
|
||||
extern void QuotesCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void QuotesOKCB(FL_OBJECT *, long);
|
||||
extern "C" void QuotesApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void QuotesCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void PaperMarginsCB(FL_OBJECT *, long);
|
||||
extern void PaperCancelCB(FL_OBJECT *, long);
|
||||
extern void PaperApplyCB(FL_OBJECT *, long);
|
||||
extern void PaperOKCB(FL_OBJECT *, long);
|
||||
extern "C" void PaperMarginsCB(FL_OBJECT *, long);
|
||||
extern "C" void PaperCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void PaperApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void PaperOKCB(FL_OBJECT *, long);
|
||||
|
||||
extern void TableOptCloseCB(FL_OBJECT *, long);
|
||||
extern void TableOptionsCB(FL_OBJECT *, long);
|
||||
extern void SetPWidthCB(FL_OBJECT *, long);
|
||||
extern "C" void TableOptCloseCB(FL_OBJECT *, long);
|
||||
extern "C" void TableOptionsCB(FL_OBJECT *, long);
|
||||
extern "C" void SetPWidthCB(FL_OBJECT *, long);
|
||||
|
||||
extern void CheckPExtraOptCB(FL_OBJECT *, long);
|
||||
extern void ParagraphExtraOKCB(FL_OBJECT *, long);
|
||||
extern void ParagraphExtraApplyCB(FL_OBJECT *, long);
|
||||
extern void ParagraphExtraCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void CheckPExtraOptCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphExtraOKCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphExtraApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void ParagraphExtraCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void TableOptionsCB(FL_OBJECT *, long);
|
||||
extern void TableSpeCloseCB(FL_OBJECT *, long);
|
||||
extern "C" void TableOptionsCB(FL_OBJECT *, long);
|
||||
extern "C" void TableSpeCloseCB(FL_OBJECT *, long);
|
||||
|
||||
/* Additional Functions/Methods */
|
||||
|
||||
|
26
src/lyx.h
26
src/lyx.h
@ -4,23 +4,23 @@
|
||||
#define FD_form_title_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void TimerCB(FL_OBJECT *, long);
|
||||
extern "C" void TimerCB(FL_OBJECT *, long);
|
||||
|
||||
extern void FigureOKCB(FL_OBJECT *, long);
|
||||
extern void FigureApplyCB(FL_OBJECT *, long);
|
||||
extern void FigureCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void FigureOKCB(FL_OBJECT *, long);
|
||||
extern "C" void FigureApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void FigureCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void ScreenOKCB(FL_OBJECT *, long);
|
||||
extern void ScreenApplyCB(FL_OBJECT *, long);
|
||||
extern void ScreenCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void ScreenOKCB(FL_OBJECT *, long);
|
||||
extern "C" void ScreenApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void ScreenCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void TocSelectCB(FL_OBJECT *, long);
|
||||
extern void TocCancelCB(FL_OBJECT *, long);
|
||||
extern void TocUpdateCB(FL_OBJECT *, long);
|
||||
extern "C" void TocSelectCB(FL_OBJECT *, long);
|
||||
extern "C" void TocCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void TocUpdateCB(FL_OBJECT *, long);
|
||||
|
||||
extern void RefUpdateCB(FL_OBJECT *, long);
|
||||
extern void RefHideCB(FL_OBJECT *, long);
|
||||
extern void RefSelectCB(FL_OBJECT *, long);
|
||||
extern "C" void RefUpdateCB(FL_OBJECT *, long);
|
||||
extern "C" void RefHideCB(FL_OBJECT *, long);
|
||||
extern "C" void RefSelectCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
90
src/lyx_cb.C
90
src/lyx_cb.C
@ -1206,7 +1206,7 @@ void MenuPasteSelection(char at)
|
||||
}
|
||||
|
||||
|
||||
void FootCB(FL_OBJECT*, long)
|
||||
extern "C" void FootCB(FL_OBJECT*, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -2305,7 +2305,7 @@ void ToggleAndShow(LyXFont const & font)
|
||||
}
|
||||
|
||||
|
||||
void MarginCB(FL_OBJECT *, long)
|
||||
extern "C" void MarginCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (current_view->available()) {
|
||||
minibuffer->Set(_("Inserting margin note..."));
|
||||
@ -2317,7 +2317,7 @@ void MarginCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void FigureCB(FL_OBJECT *, long)
|
||||
extern "C" void FigureCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (fd_form_figure->form_figure->visible) {
|
||||
fl_raise_form(fd_form_figure->form_figure);
|
||||
@ -2329,7 +2329,7 @@ void FigureCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void TableCB(FL_OBJECT *, long)
|
||||
extern "C" void TableCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (fd_form_table->form_table->visible) {
|
||||
fl_raise_form(fd_form_table->form_table);
|
||||
@ -2411,7 +2411,7 @@ void PasteCB()
|
||||
}
|
||||
|
||||
|
||||
void MeltCB(FL_OBJECT *, long)
|
||||
extern "C" void MeltCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available()) return;
|
||||
|
||||
@ -2428,7 +2428,7 @@ void MeltCB(FL_OBJECT *, long)
|
||||
// if decInc == 0, depth change taking mouse button number into account
|
||||
// if decInc == 1, increment depth
|
||||
// if decInc == -1, decrement depth
|
||||
void DepthCB(FL_OBJECT *ob, long decInc)
|
||||
extern "C" void DepthCB(FL_OBJECT *ob, long decInc)
|
||||
{
|
||||
int button = 1;
|
||||
|
||||
@ -2551,7 +2551,7 @@ void FreeCB()
|
||||
|
||||
|
||||
/* callbacks for form form_title */
|
||||
void TimerCB(FL_OBJECT *, long)
|
||||
extern "C" void TimerCB(FL_OBJECT *, long)
|
||||
{
|
||||
// only if the form still exists
|
||||
if (fd_form_title->form_title != 0) {
|
||||
@ -2566,7 +2566,7 @@ void TimerCB(FL_OBJECT *, long)
|
||||
|
||||
/* callbacks for form form_paragraph */
|
||||
|
||||
void ParagraphVSpaceCB(FL_OBJECT* obj, long )
|
||||
extern "C" void ParagraphVSpaceCB(FL_OBJECT* obj, long )
|
||||
{
|
||||
// "Synchronize" the choices and input fields, making it
|
||||
// impossible to commit senseless data.
|
||||
@ -2617,7 +2617,7 @@ void ParagraphVSpaceCB(FL_OBJECT* obj, long )
|
||||
}
|
||||
|
||||
|
||||
void ParagraphApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void ParagraphApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -2693,13 +2693,13 @@ void ParagraphApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void ParagraphCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void ParagraphCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_paragraph->form_paragraph);
|
||||
}
|
||||
|
||||
|
||||
void ParagraphOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void ParagraphOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
ParagraphApplyCB(ob, data);
|
||||
ParagraphCancelCB(ob, data);
|
||||
@ -2708,7 +2708,7 @@ void ParagraphOKCB(FL_OBJECT *ob, long data)
|
||||
|
||||
/* callbacks for form form_character */
|
||||
|
||||
void CharacterApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void CharacterApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
// we set toggleall locally here, since it should be true for
|
||||
// all other uses of ToggleAndShow() (JMarc)
|
||||
@ -2718,13 +2718,13 @@ void CharacterApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void CharacterCloseCB(FL_OBJECT *, long)
|
||||
extern "C" void CharacterCloseCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_character->form_character);
|
||||
}
|
||||
|
||||
|
||||
void CharacterOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void CharacterOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
CharacterApplyCB(ob,data);
|
||||
CharacterCloseCB(ob,data);
|
||||
@ -2755,7 +2755,7 @@ void UpdateDocumentButtons(BufferParams const ¶ms)
|
||||
|
||||
}
|
||||
|
||||
void ChoiceClassCB(FL_OBJECT *ob, long)
|
||||
extern "C" void ChoiceClassCB(FL_OBJECT *ob, long)
|
||||
{
|
||||
ProhibitInput();
|
||||
if (lyxstyle.Load(fl_get_choice(ob)-1)) {
|
||||
@ -2780,7 +2780,7 @@ void ChoiceClassCB(FL_OBJECT *ob, long)
|
||||
}
|
||||
|
||||
|
||||
void DocumentDefskipCB(FL_OBJECT *obj, long)
|
||||
extern "C" void DocumentDefskipCB(FL_OBJECT *obj, long)
|
||||
{
|
||||
// "Synchronize" the choice and the input field, so that it
|
||||
// is impossible to commit senseless data.
|
||||
@ -2809,7 +2809,7 @@ void DocumentDefskipCB(FL_OBJECT *obj, long)
|
||||
}
|
||||
|
||||
|
||||
void DocumentSpacingCB(FL_OBJECT *obj, long)
|
||||
extern "C" void DocumentSpacingCB(FL_OBJECT *obj, long)
|
||||
{
|
||||
// "Synchronize" the choice and the input field, so that it
|
||||
// is impossible to commit senseless data.
|
||||
@ -2831,7 +2831,7 @@ void DocumentSpacingCB(FL_OBJECT *obj, long)
|
||||
}
|
||||
|
||||
|
||||
void DocumentApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void DocumentApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
bool redo = false;
|
||||
BufferParams *params = &(current_view->currentBuffer()->params);
|
||||
@ -2985,20 +2985,20 @@ void DocumentApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void DocumentCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void DocumentCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_document->form_document);
|
||||
}
|
||||
|
||||
|
||||
void DocumentOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void DocumentOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
DocumentCancelCB(ob,data);
|
||||
DocumentApplyCB(ob,data);
|
||||
}
|
||||
|
||||
|
||||
void DocumentBulletsCB(FL_OBJECT *, long)
|
||||
extern "C" void DocumentBulletsCB(FL_OBJECT *, long)
|
||||
{
|
||||
bulletForm();
|
||||
// bullet callbacks etc. in bullet_panel.C -- ARRae
|
||||
@ -3056,7 +3056,7 @@ void InsertCorrectQuote()
|
||||
|
||||
/* callbacks for form form_quotes */
|
||||
|
||||
void QuotesApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void QuotesApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3095,13 +3095,13 @@ void QuotesApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void QuotesCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void QuotesCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_quotes->form_quotes);
|
||||
}
|
||||
|
||||
|
||||
void QuotesOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void QuotesOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
QuotesApplyCB(ob, data);
|
||||
QuotesCancelCB(ob, data);
|
||||
@ -3111,13 +3111,13 @@ void QuotesOKCB(FL_OBJECT *ob, long data)
|
||||
|
||||
/* callbacks for form form_preamble */
|
||||
|
||||
void PreambleCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void PreambleCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_preamble->form_preamble);
|
||||
}
|
||||
|
||||
|
||||
void PreambleApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void PreambleApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3129,7 +3129,7 @@ void PreambleApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void PreambleOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void PreambleOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
PreambleApplyCB(ob, data);
|
||||
PreambleCancelCB(ob, data);
|
||||
@ -3138,7 +3138,7 @@ void PreambleOKCB(FL_OBJECT *ob, long data)
|
||||
|
||||
/* callbacks for form form_table */
|
||||
|
||||
void TableApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void TableApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
int xsize,ysize;
|
||||
if (!current_view->getScreen())
|
||||
@ -3216,13 +3216,13 @@ void TableApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void TableCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void TableCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_table->form_table);
|
||||
}
|
||||
|
||||
|
||||
void TableOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void TableOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
TableApplyCB(ob,data);
|
||||
TableCancelCB(ob,data);
|
||||
@ -3231,7 +3231,7 @@ void TableOKCB(FL_OBJECT *ob, long data)
|
||||
|
||||
/* callbacks for form form_print */
|
||||
|
||||
void PrintCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void PrintCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_print->form_print);
|
||||
}
|
||||
@ -3243,7 +3243,7 @@ static bool stringOnlyContains (string const & LStr, const char * cset)
|
||||
return strspn(cstr,cset) == strlen(cstr) ;
|
||||
}
|
||||
|
||||
void PrintApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void PrintApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3406,7 +3406,7 @@ void PrintApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void PrintOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void PrintOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
PrintCancelCB(ob, data);
|
||||
PrintApplyCB(ob,data);
|
||||
@ -3415,7 +3415,7 @@ void PrintOKCB(FL_OBJECT *ob, long data)
|
||||
|
||||
/* callbacks for form form_figure */
|
||||
|
||||
void FigureApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void FigureApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3486,19 +3486,19 @@ void FigureApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void FigureCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void FigureCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_figure->form_figure);
|
||||
}
|
||||
|
||||
|
||||
void FigureOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void FigureOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
FigureApplyCB(ob,data);
|
||||
FigureCancelCB(ob,data);
|
||||
}
|
||||
|
||||
void ScreenApplyCB(FL_OBJECT *, long)
|
||||
extern "C" void ScreenApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
lyxrc->roman_font_name = fl_get_input(fd_form_screen->input_roman);
|
||||
lyxrc->sans_font_name = fl_get_input(fd_form_screen->input_sans);
|
||||
@ -3514,13 +3514,13 @@ void ScreenApplyCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void ScreenCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void ScreenCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_screen->form_screen);
|
||||
}
|
||||
|
||||
|
||||
void ScreenOKCB(FL_OBJECT *ob, long data)
|
||||
extern "C" void ScreenOKCB(FL_OBJECT *ob, long data)
|
||||
{
|
||||
ScreenCancelCB(ob,data);
|
||||
ScreenApplyCB(ob,data);
|
||||
@ -3643,7 +3643,7 @@ struct TocList {
|
||||
static TocList* toclist = 0;
|
||||
|
||||
|
||||
void TocSelectCB(FL_OBJECT *ob, long)
|
||||
extern "C" void TocSelectCB(FL_OBJECT *ob, long)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3687,13 +3687,13 @@ void TocSelectCB(FL_OBJECT *ob, long)
|
||||
}
|
||||
|
||||
|
||||
void TocCancelCB(FL_OBJECT *, long)
|
||||
extern "C" void TocCancelCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_toc->form_toc);
|
||||
}
|
||||
|
||||
|
||||
void TocUpdateCB(FL_OBJECT *, long)
|
||||
extern "C" void TocUpdateCB(FL_OBJECT *, long)
|
||||
{
|
||||
static LyXParagraph* stapar = 0;
|
||||
TocList *tmptoclist = 0;
|
||||
@ -3799,7 +3799,7 @@ void TocUpdateCB(FL_OBJECT *, long)
|
||||
|
||||
|
||||
/* callbacks for form form_ref */
|
||||
void RefSelectCB(FL_OBJECT *, long data)
|
||||
extern "C" void RefSelectCB(FL_OBJECT *, long data)
|
||||
{
|
||||
if (!current_view->available())
|
||||
return;
|
||||
@ -3834,7 +3834,7 @@ void RefSelectCB(FL_OBJECT *, long data)
|
||||
}
|
||||
|
||||
|
||||
void RefUpdateCB(FL_OBJECT *, long)
|
||||
extern "C" void RefUpdateCB(FL_OBJECT *, long)
|
||||
{
|
||||
if (!current_view->available()) {
|
||||
fl_clear_browser(fd_form_ref->browser_ref);
|
||||
@ -3903,7 +3903,7 @@ void RefUpdateCB(FL_OBJECT *, long)
|
||||
}
|
||||
|
||||
|
||||
void RefHideCB(FL_OBJECT *, long)
|
||||
extern "C" void RefHideCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_hide_form(fd_form_ref->form_ref);
|
||||
}
|
||||
|
12
src/lyx_cb.h
12
src/lyx_cb.h
@ -16,7 +16,7 @@ extern bool quitting;
|
||||
extern bool BindFileSet;
|
||||
|
||||
///
|
||||
extern void FootCB(FL_OBJECT *, long);
|
||||
extern "C" void FootCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void EmphCB();
|
||||
///
|
||||
@ -24,17 +24,17 @@ extern void BoldCB();
|
||||
///
|
||||
extern void NounCB();
|
||||
///
|
||||
extern void MarginCB(FL_OBJECT *, long);
|
||||
extern "C" void MarginCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void FigureCB(FL_OBJECT *, long);
|
||||
extern "C" void FigureCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void TableCB(FL_OBJECT *, long);
|
||||
extern "C" void TableCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void MeltCB(FL_OBJECT *, long);
|
||||
extern "C" void MeltCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void TexCB();
|
||||
///
|
||||
extern void DepthCB(FL_OBJECT *, long);
|
||||
extern "C" void DepthCB(FL_OBJECT *, long);
|
||||
///
|
||||
extern void FreeCB();
|
||||
///
|
||||
|
@ -144,7 +144,7 @@ FL_resource res[] =
|
||||
};
|
||||
|
||||
|
||||
static int LyX_XErrHandler(Display *display, XErrorEvent *xeev)
|
||||
extern "C" int LyX_XErrHandler(Display *display, XErrorEvent *xeev)
|
||||
{
|
||||
//#warning Please see if you can trigger this!
|
||||
// emergency save
|
||||
|
@ -70,14 +70,14 @@ extern void TocUpdateCB();
|
||||
extern void HideFiguresPopups();
|
||||
|
||||
// Prevents LyX from being killed when the close box is pressed in a popup.
|
||||
int CancelCloseBoxCB(FL_FORM *, void *)
|
||||
extern "C" int CancelCloseBoxCB(FL_FORM *, void *)
|
||||
{
|
||||
return FL_CANCEL;
|
||||
}
|
||||
|
||||
|
||||
// Prevents LyX from being killed when the close box is pressed in a popup.
|
||||
int IgnoreCloseBoxCB(FL_FORM *, void *)
|
||||
extern "C" int IgnoreCloseBoxCB(FL_FORM *, void *)
|
||||
{
|
||||
return FL_IGNORE;
|
||||
}
|
||||
|
@ -4,17 +4,17 @@
|
||||
#define FD_xsendfax_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void FaxSendCB(FL_OBJECT *, long);
|
||||
extern void FaxCancelCB(FL_OBJECT *, long);
|
||||
extern void FaxApplyCB(FL_OBJECT *, long);
|
||||
extern void FaxOpenPhonebookCB(FL_OBJECT *, long);
|
||||
extern void cb_add_phoneno(FL_OBJECT *, long);
|
||||
extern void cb_delete_phoneno(FL_OBJECT *, long);
|
||||
extern void cb_save_phoneno(FL_OBJECT *, long);
|
||||
extern "C" void FaxSendCB(FL_OBJECT *, long);
|
||||
extern "C" void FaxCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void FaxApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void FaxOpenPhonebookCB(FL_OBJECT *, long);
|
||||
extern "C" void cb_add_phoneno(FL_OBJECT *, long);
|
||||
extern "C" void cb_delete_phoneno(FL_OBJECT *, long);
|
||||
extern "C" void cb_save_phoneno(FL_OBJECT *, long);
|
||||
|
||||
extern void cb_select_phoneno(FL_OBJECT *, long);
|
||||
extern "C" void cb_select_phoneno(FL_OBJECT *, long);
|
||||
|
||||
extern void FaxLogfileCloseCB(FL_OBJECT *, long);
|
||||
extern "C" void FaxLogfileCloseCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define FD_panel_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern "C" {
|
||||
extern void button_cb(FL_OBJECT *, long);
|
||||
|
||||
extern void delim_cb(FL_OBJECT *, long);
|
||||
@ -13,7 +14,7 @@ extern void matrix_cb(FL_OBJECT *, long);
|
||||
extern void deco_cb(FL_OBJECT *, long);
|
||||
|
||||
extern void space_cb(FL_OBJECT *, long);
|
||||
|
||||
}
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
typedef struct {
|
||||
|
@ -244,7 +244,7 @@ void space_cb(FL_OBJECT *, long data)
|
||||
}
|
||||
}
|
||||
|
||||
int align_filter(FL_OBJECT *, char const *, char const *cur, int c)
|
||||
extern "C" int align_filter(FL_OBJECT *, char const *, char const *cur, int c)
|
||||
{
|
||||
int n = (int)(fl_get_slider_value(fd_matrix->columns)+0.5) - strlen(cur);
|
||||
return ((c=='c'||c=='l'||c=='r') && n>=0) ? FL_VALID: FL_INVALID;
|
||||
@ -320,20 +320,19 @@ void free_symbols_form()
|
||||
}
|
||||
}
|
||||
|
||||
int AtClose_symbols_form(FL_FORM *, void *)
|
||||
extern "C" int AtClose_symbols_form(FL_FORM *, void *)
|
||||
{
|
||||
free_symbols_form();
|
||||
return FL_IGNORE;
|
||||
}
|
||||
|
||||
|
||||
void show_symbols_form(LyXFunc *lf)
|
||||
{
|
||||
lyxfunc = lf;
|
||||
if (!fd_panel) {
|
||||
fd_panel = create_math_panel();
|
||||
fl_register_raw_callback(fd_panel->panel,
|
||||
ButtonPressMask|KeyPressMask, peek_event);
|
||||
ButtonPressMask|KeyPressMask, C_peek_event);
|
||||
create_symbol_menues(fd_panel);
|
||||
fl_set_form_atclose(fd_panel->panel, AtClose_symbols_form, 0);
|
||||
}
|
||||
|
@ -35,17 +35,13 @@ enum {
|
||||
///
|
||||
typedef FL_OBJECT* FL_OBJECTP;
|
||||
|
||||
extern "C" {
|
||||
int peek_event(FL_FORM *, void *);
|
||||
}
|
||||
|
||||
/// Class to manage bitmap menu bars
|
||||
class BitmapMenu {
|
||||
///
|
||||
static BitmapMenu *active;
|
||||
///
|
||||
friend int peek_event(FL_FORM *, void *);
|
||||
protected:
|
||||
protected:
|
||||
///
|
||||
BitmapMenu *next, *prev;
|
||||
///
|
||||
@ -85,6 +81,9 @@ class BitmapMenu {
|
||||
int GetIndex(FL_OBJECT* ob);
|
||||
};
|
||||
|
||||
// This is just a wrapper around peek_event()
|
||||
extern "C" int C_peek_event(FL_FORM *form, void *ptr);
|
||||
|
||||
|
||||
inline
|
||||
void BitmapMenu::Prev() {
|
||||
|
@ -23,6 +23,10 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Is it safe to use 'using' unconditionnally?
|
||||
#endif
|
||||
using std::max;
|
||||
|
||||
#include "lyx_main.h"
|
||||
#include "buffer.h"
|
||||
@ -132,7 +136,7 @@ static signed char Latin2Greek[] = {
|
||||
};
|
||||
|
||||
extern char** mathed_get_pixmap_from_icon(int d);
|
||||
static void math_cb(FL_OBJECT*, long);
|
||||
extern "C" void math_cb(FL_OBJECT*, long);
|
||||
static char** pixmapFromBitmapData(char const *, int, int);
|
||||
void math_insert_symbol(char const* s);
|
||||
Bool math_insert_greek(char const c);
|
||||
@ -216,7 +220,7 @@ void BitmapMenu::Create()
|
||||
bitmap[i]->u_vdata = this;
|
||||
}
|
||||
fl_end_form();
|
||||
fl_register_raw_callback(form, KeyPressMask, peek_event);
|
||||
fl_register_raw_callback(form, KeyPressMask, C_peek_event);
|
||||
}
|
||||
|
||||
int BitmapMenu::GetIndex(FL_OBJECT* ob)
|
||||
@ -232,7 +236,6 @@ int BitmapMenu::GetIndex(FL_OBJECT* ob)
|
||||
return -1;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
int peek_event(FL_FORM * /*form*/, void *xev)
|
||||
{
|
||||
if (BitmapMenu::active==0)
|
||||
@ -258,9 +261,14 @@ int peek_event(FL_FORM * /*form*/, void *xev)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This is just a wrapper.
|
||||
extern "C" int C_peek_event(FL_FORM *form, void *ptr) {
|
||||
return peek_event(form,ptr);
|
||||
}
|
||||
|
||||
static void math_cb(FL_OBJECT* ob, long data)
|
||||
|
||||
extern "C" void math_cb(FL_OBJECT* ob, long data)
|
||||
{
|
||||
BitmapMenu* menu = (BitmapMenu*)ob->u_vdata;
|
||||
int i = menu->GetIndex(ob);
|
||||
|
@ -54,7 +54,7 @@ struct binary_op_pair { short id, isrel; } binary_op_table[] = {
|
||||
{ LM_ddagger, LMB_OPERATOR }
|
||||
};
|
||||
|
||||
static int compara(const void *a, const void *b)
|
||||
extern "C" int compara(const void *a, const void *b)
|
||||
{
|
||||
int i = ((binary_op_pair const *)a)->id, j = ((binary_op_pair const*)b)->id;
|
||||
return i - j;
|
||||
|
@ -4,13 +4,13 @@
|
||||
#define FD_form_print_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void PrintOKCB(FL_OBJECT *, long);
|
||||
extern void PrintApplyCB(FL_OBJECT *, long);
|
||||
extern void PrintCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void PrintOKCB(FL_OBJECT *, long);
|
||||
extern "C" void PrintApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void PrintCancelCB(FL_OBJECT *, long);
|
||||
|
||||
extern void SendtoOKCB(FL_OBJECT *, long);
|
||||
extern void SendtoApplyCB(FL_OBJECT *, long);
|
||||
extern void SendtoCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void SendtoOKCB(FL_OBJECT *, long);
|
||||
extern "C" void SendtoApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void SendtoCancelCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
|
@ -4,9 +4,9 @@
|
||||
#define FD_form_spell_options_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern void SpellOptionsOKCB(FL_OBJECT *, long);
|
||||
extern void SpellOptionsCancelCB(FL_OBJECT *, long);
|
||||
extern void SpellOptionsApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void SpellOptionsOKCB(FL_OBJECT *, long);
|
||||
extern "C" void SpellOptionsCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void SpellOptionsApplyCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef MODERN_STL
|
||||
//#ifdef MODERN_STL
|
||||
using std::ostream;
|
||||
using std::streambuf;
|
||||
using std::streamsize;
|
||||
@ -30,7 +30,7 @@ using std::filebuf;
|
||||
using std::cerr;
|
||||
using std::ios;
|
||||
using std::endl;
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#ifdef TEST_DEBUGSTREAM
|
||||
#include <string>
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
//#include "debug.h"
|
||||
|
||||
using std::count;
|
||||
|
||||
bool isStrInt(string const & str)
|
||||
{
|
||||
if (str.empty()) return false;
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "LAssert.h"
|
||||
|
||||
using std::min;
|
||||
|
||||
// Reference count has been checked, empty_rep removed and
|
||||
// introduced again in a similar guise. Where is empty_rep _really_
|
||||
// needed?
|
||||
|
@ -92,6 +92,7 @@
|
||||
#include "layout_std.xpm"
|
||||
#include "build.xpm"
|
||||
|
||||
// this one is not "C" because combox callbacks are really C++ %-|
|
||||
extern void LayoutsCB(int, void*);
|
||||
extern char** get_pixmap_from_symbol(char const *arg, int, int);
|
||||
extern LyXAction lyxaction;
|
||||
|
Loading…
Reference in New Issue
Block a user