00001 // BFontSelector.h (this is -*- C++ -*-) 00002 // 00003 // \author: Bjoern Giesler <bjoern@giesler.de> 00004 // 00005 // 00006 // 00007 // $Author: giesler $ 00008 // $Locker$ 00009 // $Revision$ 00010 // $Date: 2002-08-19 10:41:28 +0200 (Mon, 19 Aug 2002) $ 00011 00012 #ifndef BFONTSELECTOR_H 00013 #define BFONTSELECTOR_H 00014 00015 /* system includes */ 00016 /* (none) */ 00017 00018 /* my includes */ 00019 #include "BDialog.h" 00020 #include "BButton.h" 00021 #include "BListbox.h" 00022 #include "BScroller.h" 00023 #include "BLabel.h" 00024 #include "BText.h" 00025 00029 class BFontSelector: 00030 public BDialog, 00031 public BListbox::Delegate, 00032 public BButton::Delegate 00033 { 00034 public: 00035 BFontSelector(BScreen* screen); 00036 00038 bool cancelled() { return _cancelled; } 00039 00041 BFont* font() { return _font; } 00042 00044 void setFont(BFont* font); 00045 00046 void onEntryClick(BListbox* box, BListbox::Entry& e); 00047 void onButtonClick(BButton* button); 00048 00049 void setRotation(BWidget::Rotation rot); 00050 private: 00051 void updateSizesBox(); 00052 void updateVariants(); 00053 void updatePreview(); 00054 00055 BListbox *_namesBox, *_sizesBox; 00056 BButton *_boldButton, *_italicButton; 00057 BText *_preview; 00058 BButton *_okButton, *_cancelButton; 00059 bool _cancelled; 00060 BFont *_font; 00061 }; 00062 00063 #endif /* BFONTSELECTOR_H */
1.3-rc3