2001-06-13 13:44:23 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-21 21:21:28 +00:00
|
|
|
/**
|
2001-02-26 15:17:19 +00:00
|
|
|
* \file FormCharacter.h
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
2002-03-21 21:21:28 +00:00
|
|
|
*
|
2001-02-26 15:17:19 +00:00
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
2001-02-26 15:17:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORM_CHARACTER_H
|
|
|
|
#define FORM_CHARACTER_H
|
|
|
|
|
2002-04-23 08:16:27 +00:00
|
|
|
#ifdef __GNUG__
|
2001-02-26 15:17:19 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-03-21 13:27:03 +00:00
|
|
|
#include "FormBase.h"
|
|
|
|
#include "lyxfont.h" // for LyXFont enums
|
|
|
|
#include "ControlCharacter.h" // for ControlCharacter enum
|
|
|
|
#include "LColor.h" // for LColor enum
|
2001-03-28 13:11:08 +00:00
|
|
|
#include "character.h" // for FONT_STATE enum
|
2001-03-16 12:08:14 +00:00
|
|
|
|
2002-05-22 01:16:37 +00:00
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
|
|
|
2001-02-26 15:17:19 +00:00
|
|
|
class Combox;
|
2002-06-13 13:43:51 +00:00
|
|
|
struct FD_character;
|
2001-02-26 15:17:19 +00:00
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
/**
|
2001-03-27 16:03:28 +00:00
|
|
|
* This class provides an XForms implementation of the Character Dialog.
|
2001-02-26 15:17:19 +00:00
|
|
|
* The character dialog allows users to change the character settings
|
|
|
|
* in their documents.
|
|
|
|
*/
|
2001-03-21 13:27:03 +00:00
|
|
|
class FormCharacter
|
2002-06-13 13:43:51 +00:00
|
|
|
: public FormCB<ControlCharacter, FormDB<FD_character> > {
|
2001-02-26 15:17:19 +00:00
|
|
|
public:
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
2002-07-02 19:23:10 +00:00
|
|
|
FormCharacter(ControlCharacter &, Dialogs &);
|
2001-02-26 15:17:19 +00:00
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/// Apply from dialog
|
2001-03-15 13:37:04 +00:00
|
|
|
virtual void apply();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/// Build the dialog
|
2001-03-27 16:03:28 +00:00
|
|
|
virtual void build();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-06-12 13:54:04 +00:00
|
|
|
/// Update the dialog.
|
|
|
|
virtual void update();
|
|
|
|
|
|
|
|
/// Filter the inputs on callback from xforms
|
|
|
|
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
2001-02-26 15:17:19 +00:00
|
|
|
|
2001-03-21 13:27:03 +00:00
|
|
|
/** Callback method (used only to activate Apply button when
|
|
|
|
combox is changed */
|
|
|
|
static void ComboInputCB(int, void *, Combox *);
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
|
|
|
boost::scoped_ptr<Combox> combo_language2_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LyXFont::FONT_FAMILY> family_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LyXFont::FONT_SERIES> series_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LyXFont::FONT_SHAPE> shape_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LyXFont::FONT_SIZE> size_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2002-04-29 15:56:36 +00:00
|
|
|
std::vector<frnt::FONT_STATE> bar_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LColor::color> color_;
|
2002-04-29 14:26:42 +00:00
|
|
|
///
|
|
|
|
std::vector<string> lang_;
|
2001-02-26 15:17:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|