/usr/include/root/TGFontDialog.h is in libroot-gui-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | // @(#)root/gui:$Id$
// Author: Bertrand Bellenot + Fons Rademakers 23/04/03
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TGFontDialog
#define ROOT_TGFontDialog
//////////////////////////////////////////////////////////////////////////
// //
// TGFontDialog. //
// //
// The TGFontDialog allows easy font and font attribute selection. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TGButton;
class TGLabel;
class TGListBox;
class TGComboBox;
class TGColorSelect;
class TGFont;
class TGFontDialog : public TGTransientFrame {
public:
struct FontProp_t {
TString fName; // font name
Int_t fSize; // font size
UInt_t fAlign; // text alignment
Pixel_t fColor; // text color
Bool_t fBold; // bold flag
Bool_t fItalic; // italic flag
};
protected:
TGListBox *fFontNames; // list of font names
TGListBox *fFontSizes; // list of font sizes
TGListBox *fFontStyles; // list of font styles
TGComboBox *fTextAligns; // font alignment selection
TGLabel *fSample; // sample of selected font
TGColorSelect *fColorSelect; // color selection dialog
TString fName; // font name
TString fLName; // logical font name
FontProp_t *fFontProp; // font info structure
Bool_t fItalic; // italic flag
Bool_t fBold; // bold flag
Int_t fSize; // font size
Int_t fTextAlign; // text aligment
Pixel_t fTextColor; // text color
Pixel_t fInitColor; // initial value of text color
Int_t fInitAlign; // initialvalue of text align
TGFont *fInitFont; // initial font
TString fSampleText; // string used for sample
TGGC *fSampleTextGC; // GC used for sample text
TGFont *fLabelFont; // TGFont used for sample text
Bool_t fHitOK; // flag = kTRUE if user press the Ok button
Int_t fNumberOfFonts;// total numbder of fonts
Bool_t fWaitFor; // if kTRUE WaitForUnmap is called in constructor.
Bool_t Build(char **fontList, Int_t cnt);
void GetFontName();
virtual void CloseWindow();
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
public:
TGFontDialog(const TGWindow *parent = 0, const TGWindow *t = 0,
FontProp_t *fontProp = 0, const TString &sample = "",
char **fontList = 0, Bool_t wait = kTRUE);
virtual ~TGFontDialog();
virtual void SetFont(TGFont *font);
virtual void SetColor(Pixel_t color);
virtual void SetAlign(Int_t align);
virtual void EnableAlign(Bool_t on = kTRUE);
virtual void UpdateStyleSize(const char *family);
virtual void FontSelected(char *font)
{ Emit("FontSelected(char*)", font); } //*SIGNAL*
virtual void AlignSelected(Int_t a)
{ Emit("AlignSelected(Int_t)", a); } //*SIGNAL*
virtual void ColorSelected(Pixel_t c)
{ Emit("ColorSelected(Pixel_t)", c); } //*SIGNAL*
ClassDef(TGFontDialog,0) // Font selection dialog
};
#endif
|