2001-06-13 13:44:23 +00:00
|
|
|
// -*- C++ -*-
|
2001-02-26 15:17:19 +00:00
|
|
|
/**
|
|
|
|
* \file FormCharacter.h
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
2001-03-21 13:27:03 +00:00
|
|
|
* \author Angus Leeming, a.leeming@.ac.uk
|
2001-02-26 15:17:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORM_CHARACTER_H
|
|
|
|
#define FORM_CHARACTER_H
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
|
2001-02-26 15:17:19 +00:00
|
|
|
#ifdef __GNUG_
|
|
|
|
#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
|
|
|
|
2001-02-26 15:17:19 +00:00
|
|
|
class Combox;
|
|
|
|
struct FD_form_character;
|
|
|
|
|
|
|
|
/**
|
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
|
|
|
|
: public FormCB<ControlCharacter, FormDB<FD_form_character> > {
|
2001-02-26 15:17:19 +00:00
|
|
|
public:
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
2001-03-21 13:27:03 +00:00
|
|
|
FormCharacter(ControlCharacter &);
|
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();
|
2001-02-26 15:17:19 +00:00
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/// Build the dialog
|
2001-03-27 16:03:28 +00:00
|
|
|
virtual void build();
|
|
|
|
|
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-27 10:44:14 +00:00
|
|
|
/// Fdesign generated method
|
2001-03-15 13:37:04 +00:00
|
|
|
FD_form_character * build_character();
|
2001-02-26 15:17:19 +00:00
|
|
|
|
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
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<character::FONT_STATE> bar_;
|
2001-03-21 13:27:03 +00:00
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
std::vector<LColor::color> color_;
|
2001-02-26 15:17:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|