51#include "RConfigure.h"
140 if (
gVirtualX->InheritsFrom(
"TGWin32")) {
291 Error(
"TGComboBox",
"arrow_down.xpm not found");
318 "KeyPressed(TGFrame*, UInt_t, UInt_t)");
346 if (
gClient->GetStyle() > 1)
break;
540 if (
h && (
h < 100)) {
633 Emit(
"Selected(Int_t,Int_t)", args);
666 Emit(
"ReturnPressed()");
703 out << std::endl <<
" // combo box" << std::endl;
704 out <<
" TGComboBox *";
715 out <<
");" << std::endl;
722 if (option && strstr(option,
"keep_names"))
723 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
733 out <<
" " <<
GetName() <<
"->AddEntry(";
734 b->SavePrimitive(out, option);
735 out <<
");" << std::endl;
754 for (
Int_t i = 1; i <= 10; i++)
769 out << std::endl <<
" // line style combo box" << std::endl;
770 out <<
" TGLineStyleComboBox *";
773 <<
"," <<
fWidgetId <<
");" << std::endl;
774 if (option && strstr(option,
"keep_names"))
775 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
798 for (
Int_t i = 0; i < 16; i++)
811 out << std::endl <<
" // line width combo box" << std::endl;
812 out <<
" TGLineWidthComboBox *";
815 <<
"," <<
fWidgetId <<
");" << std::endl;
816 if (option && strstr(option,
"keep_names"))
817 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
825 {
"-*-times-medium-i-*-*-12-*-*-*-*-*-*-*",
"1. times italic" },
826 {
"-*-times-bold-r-*-*-12-*-*-*-*-*-*-*",
"2. times bold" },
827 {
"-*-times-bold-i-*-*-12-*-*-*-*-*-*-*",
"3. times bold italic" },
828 {
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*",
"4. helvetica" },
829 {
"-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*",
"5. helvetica italic" },
830 {
"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*",
"6. helvetica bold" },
831 {
"-*-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*",
"7. helvetica bold italic" },
832 {
"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-*",
"8. courier" },
833 {
"-*-courier-medium-o-*-*-12-*-*-*-*-*-*-*",
"9. courier italic" },
834 {
"-*-courier-bold-r-*-*-12-*-*-*-*-*-*-*",
"10. courier bold" },
835 {
"-*-courier-bold-o-*-*-12-*-*-*-*-*-*-*",
"11. courier bold italic" },
836 {
"-*-symbol-medium-r-*-*-12-*-*-*-*-*-*-*",
"12. symbol" },
837 {
"-*-times-medium-r-*-*-12-*-*-*-*-*-*-*",
"13. times" },
const Mask_t kWABorderPixel
const Mask_t kWAOverrideRedirect
const Mask_t kButtonPressMask
const Mask_t kWASaveUnder
const Mask_t kAnyModifier
const Mask_t kPointerMotionMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
const Mask_t kWABorderWidth
static const char * gFonts[][2]
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Bool_t IsEditable() const
void RegisterPopup(TGWindow *w)
Add a popup menu to the list of popups.
void WaitForUnmap(TGWindow *w)
Wait for window to be unmapped.
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get graphics context from the gc pool.
const TGResourcePool * GetResourcePool() const
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void FreePicture(const TGPicture *pic)
Free picture resource.
virtual Int_t GetSelected() const
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request in text entry.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events in the combo box.
virtual void AddEntry(TGString *s, Int_t id)
virtual void RemoveAll()
Remove all entries from combo box.
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 Bool_t HandleSelection(Event_t *event)
Handle selection in text entry.
virtual void RemoveEntry(Int_t id=-1)
Remove entry. If id == -1, the currently selected entry is removed.
virtual TGListBox * GetListBox() const
virtual ~TGComboBox()
Delete a combo box widget.
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion in text entry.
TGScrollBarElement * fDDButton
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 void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click in text entry.
virtual void DrawBorder()
Draw border of combo box widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a combo box widget as a C++ statement(s) on output stream out.
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
virtual void Selected(Int_t widgetId, Int_t id)
Emit signal.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
TGComboBox(const TGComboBox &)
virtual void EnableTextInput(Bool_t on)
Switch text input or readonly mode of combobox (not perfect yet).
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...
virtual void Layout()
layout combobox
virtual Int_t GetNumberOfEntries() const
virtual void Init()
Initiate the internal classes of a combo box.
TGComboBoxPopup * fComboFrame
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual TGLayoutManager * GetLayoutManager() const
virtual void Layout()
Layout the elements of the composite frame.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual Int_t MustCleanup() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual ~TGFontTypeComboBox()
Text font combo box dtor.
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.
FontStruct_t fFonts[kMaxFonts]
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
static const TGGC & GetBlackGC()
Get black graphics context.
virtual void MapRaised()
map raised
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void DrawBorder()
Draw frame border.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Pixel_t GetBackground() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
static Pixel_t fgBlackPixel
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void UnmapWindow()
unmap window
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
virtual void Update(TGLBEntry *)
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.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a line style combo box widget as a C++ statement(s).
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 void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
virtual Int_t GetNumberOfEntries() const
virtual TGLBEntry * GetSelectedEntry() const
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
virtual void RemoveAll()
Remove all entries.
virtual TGScrollBar * GetScrollBar() const
UInt_t GetItemVsize() const
virtual TGFrame * GetContainer() const
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
Cursor_t GetGrabCursor() const
const char * GetString() const
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle request to send current clipboard contents to requestor window.
const char * GetText() const
virtual void SetTitle(const char *label)
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in the text entry widget.
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 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 Bool_t HandleSelection(Event_t *event)
Handle text selection event.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle mouse double click event in the text entry widget.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
const TGString * GetText() const
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use for a text listbox entry.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void RequestFocus()
request focus
virtual void SetEditDisabled(UInt_t on=kEditDisable)
virtual void DestroyWindow()
destroy window
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
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.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static constexpr double s