50 #include "RConfigure.h" 283 Error(
"TGComboBox",
"arrow_down.xpm not found");
295 fListBox->
Resize(100, 100);
296 fListBox->Associate(
this);
297 fListBox->GetScrollBar()->GrabPointer(
kFALSE);
308 fListBox->GetContainer()->
Connect(
"KeyPressed(TGFrame*, UInt_t, UInt_t)",
310 "KeyPressed(TGFrame*, UInt_t, UInt_t)");
338 if (
gClient->GetStyle() > 1)
break;
357 const char *
text =
"";
532 if (h && (h < 100)) {
625 Emit(
"Selected(Int_t,Int_t)", args);
658 Emit(
"ReturnPressed()");
695 out << std::endl <<
" // combo box" << std::endl;
696 out <<
" TGComboBox *";
707 out <<
");" << std::endl;
714 if (option && strstr(option,
"keep_names"))
715 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
725 out <<
" " <<
GetName() <<
"->AddEntry(";
727 out <<
");" << std::endl;
746 for (
Int_t i = 1; i <= 10; i++)
761 out << std::endl <<
" // line style combo box" << std::endl;
762 out <<
" TGLineStyleComboBox *";
765 <<
"," <<
fWidgetId <<
");" << std::endl;
766 if (option && strstr(option,
"keep_names"))
767 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
790 for (
Int_t i = 0; i < 16; i++)
803 out << std::endl <<
" // line width combo box" << std::endl;
804 out <<
" TGLineWidthComboBox *";
807 <<
"," <<
fWidgetId <<
");" << std::endl;
808 if (option && strstr(option,
"keep_names"))
809 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
817 {
"-*-times-medium-i-*-*-12-*-*-*-*-*-*-*",
"1. times italic" },
818 {
"-*-times-bold-r-*-*-12-*-*-*-*-*-*-*",
"2. times bold" },
819 {
"-*-times-bold-i-*-*-12-*-*-*-*-*-*-*",
"3. times bold italic" },
820 {
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*",
"4. helvetica" },
821 {
"-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*",
"5. helvetica italic" },
822 {
"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*",
"6. helvetica bold" },
823 {
"-*-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*",
"7. helvetica bold italic" },
824 {
"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-*",
"8. courier" },
825 {
"-*-courier-medium-o-*-*-12-*-*-*-*-*-*-*",
"9. courier italic" },
826 {
"-*-courier-bold-r-*-*-12-*-*-*-*-*-*-*",
"10. courier bold" },
827 {
"-*-courier-bold-o-*-*-12-*-*-*-*-*-*-*",
"11. courier bold italic" },
828 {
"-*-symbol-medium-r-*-*-12-*-*-*-*-*-*-*",
"12. symbol" },
829 {
"-*-times-medium-r-*-*-12-*-*-*-*-*-*-*",
"13. times" },
860 if (noFonts < kMaxFonts - 1)
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle request to send current clipboard contents to requestor window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a list box entry widget as a C++ statement(s) on output stream out.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
Cursor_t GetGrabCursor() const
virtual UInt_t GetOptions() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
TGScrollBarElement * fDDButton
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion in text entry.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual TGFrame * GetContainer() const
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
UInt_t GetItemVsize() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual Bool_t HandleSelection(Event_t *event)
Handle text selection event.
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void Update(TGLBEntry *)
TGComboBox(const TGComboBox &)
const Mask_t kWABorderPixel
const TGResourcePool * GetResourcePool() const
virtual void DrawBorder()
Draw border of combo box widget.
virtual void DrawBorder()
Draw frame border.
virtual void SetTitle(const char *label)
virtual UInt_t GetDefaultHeight() const
TGLineStyleComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel())
Create a line style combo box.
void WaitForUnmap(TGWindow *w)
Wait for window to be unmapped.
virtual void Layout()
Layout the elements of the composite frame.
TGComboBoxPopup * fComboFrame
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
const Mask_t kPointerMotionMask
void RegisterPopup(TGWindow *w)
Add a popup menu to the list of popups.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
void FreePicture(const TGPicture *pic)
Free picture resource.
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in the text entry widget.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
static Pixel_t fgBlackPixel
virtual void SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
Set a new combo box value (normally update of text string in fSelEntry is done via fSelEntry::Update(...
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual ~TGComboBox()
Delete a combo box widget.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual TList * GetList() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
virtual void RemoveAll()
Remove all entries from combo box.
virtual void RequestFocus()
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
virtual TGLBEntry * GetSelectedEntry() const
virtual TGListBox * GetListBox() const
const Mask_t kButtonPressMask
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
virtual void RemoveAll()
Remove all entries.
virtual void SetFrameDrawn(Bool_t flag=kTRUE)
Sets the text entry to draw itself inside a two-pixel frame if enable is kTRUE, and to draw itself wi...
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in text entry.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
const Mask_t kWASaveUnder
Bool_t IsEditable() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line style combo box widget as a C++ statement(s).
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a combo box widget as a C++ statement(s) on output stream out.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle mouse double click event in the text entry widget.
virtual void EnableTextInput(Bool_t on)
Switch text input or readonly mode of combobox (not perfect yet).
virtual Pixel_t GetBackground() const
virtual ~TGFontTypeComboBox()
Text font combo box dtor.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in the combo box.
static const TGGC & GetBlackGC()
Get black graphics context.
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
virtual Int_t GetNumberOfEntries() const
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get graphics context from the gc pool.
const char * GetString() const
const char * GetText() const
TGFontTypeComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t bask=GetWhitePixel())
Create a text font combo box.
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
const TGString * GetText() const
const Mask_t kStructureNotifyMask
virtual void AddEntry(TGString *s, Int_t id)
const Mask_t kButtonReleaseMask
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual Bool_t HandleSelection(Event_t *event)
Handle selection in text entry.
virtual void Selected(Int_t widgetId, Int_t id)
Emit signal.
const Mask_t kWAOverrideRedirect
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
const TGWindow * GetParent() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual Int_t GetNumberOfEntries() const
virtual TGScrollBar * GetScrollBar() const
TGLineWidthComboBox(const TGWindow *p=0, Int_t id=-1, UInt_t options=kHorizontalFrame|kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel(), Bool_t none=kFALSE)
Create a line width combo box.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line width combo box widget as a C++ statement(s).
virtual TGLayoutManager * GetLayoutManager() const
virtual void UnmapWindow()
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
virtual void SetEditDisabled(UInt_t on=kEditDisable)
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted...
virtual Int_t GetSelected() const
const Mask_t kWABorderWidth
static const char * gFonts[][2]
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by the listbox and forward messages to the combobox message handling windo...
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
virtual void Init()
Initiate the internal classes of a combo box.
FontStruct_t fFonts[kMaxFonts]
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
virtual void Layout()
layout combobox
const Mask_t kAnyModifier
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use for a text listbox entry.
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request in text entry.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void DestroyWindow()
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual Int_t MustCleanup() const
const char * Data() const