50 #include "RConfigure.h"
53 ClassImp(TGComboBoxPopup);
56 ClassImp(TGLineStyleComboBox);
57 ClassImp(TGLineWidthComboBox);
58 ClassImp(TGFontTypeComboBox);
63 TGComboBoxPopup::TGComboBoxPopup(
const TGWindow *p, UInt_t w, UInt_t h,
64 UInt_t options, ULong_t back) :
65 TGCompositeFrame (p, w, h, options, back), fListBox(0), fSelected(0)
67 SetWindowAttributes_t wattr;
69 wattr.fMask = kWAOverrideRedirect | kWASaveUnder |
70 kWABorderPixel | kWABorderWidth;
71 wattr.fOverrideRedirect = kTRUE;
72 wattr.fSaveUnder = kTRUE;
73 wattr.fBorderPixel = fgBlackPixel;
74 wattr.fBorderWidth = 1;
75 gVirtualX->ChangeWindowAttributes(fId, &wattr);
77 AddInput(kStructureNotifyMask);
78 fEditDisabled = kEditDisable | kEditDisableGrab | kEditDisableBtnEnable;
85 Bool_t TGComboBoxPopup::HandleButton(Event_t *event)
87 if (event->fType == kButtonPress && event->fCode == kButton1) {
88 if ((fListBox != 0) && (fSelected != 0) &&
89 fListBox->GetSelectedEntry() != fSelected) {
92 fListBox->Select(fSelected->EntryId());
99 fListBox->GetScrollBar()->SetDragging(kFALSE);
107 void TGComboBoxPopup::EndPopup()
110 Handle_t
id = fListBox->GetContainer()->GetId();
111 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Up),
112 kAnyModifier, kFALSE);
113 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Down),
114 kAnyModifier, kFALSE);
115 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Enter),
116 kAnyModifier, kFALSE);
117 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Return),
118 kAnyModifier, kFALSE);
119 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Escape),
120 kAnyModifier, kFALSE);
121 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Space),
122 kAnyModifier, kFALSE);
123 gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
131 void TGComboBoxPopup::PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
137 gVirtualX->GetWindowSize(fParent->GetId(), rx, ry, rw, rh);
139 if (gVirtualX->InheritsFrom(
"TGWin32")) {
140 if ((x > 0) && ((x + abs(rx) + (Int_t)fWidth) > (Int_t)rw))
141 x = rw - abs(rx) - fWidth;
142 if ((y > 0) && (y + abs(ry) + (Int_t)fHeight > (Int_t)rh))
146 if (x + fWidth > rw) x = rw - fWidth;
148 if (y + fHeight > rh) y = rh - fHeight;
154 TGFrameElement *el = (TGFrameElement *)fList->First();
155 fListBox =
dynamic_cast<TGListBox *
>(el->fFrame);
157 fSelected = fListBox ? fListBox->GetSelectedEntry() : 0;
159 MoveResize(x, y, w, h);
164 Handle_t
id = fListBox->GetContainer()->GetId();
165 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Up),
166 kAnyModifier, kTRUE);
167 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Down),
168 kAnyModifier, kTRUE);
169 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Enter),
170 kAnyModifier, kTRUE);
171 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Return),
172 kAnyModifier, kTRUE);
173 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Escape),
174 kAnyModifier, kTRUE);
175 gVirtualX->GrabKey(
id, gVirtualX->KeysymToKeycode(kKey_Space),
176 kAnyModifier, kTRUE);
177 fListBox->GetContainer()->RequestFocus();
179 gVirtualX->GrabPointer(fId, kButtonPressMask | kButtonReleaseMask |
180 kPointerMotionMask, kNone,
181 fClient->GetResourcePool()->GetGrabCursor());
183 if (fClient->IsEditable()) {
184 fClient->RegisterPopup(
this);
187 fClient->WaitForUnmap(
this);
194 void TGComboBoxPopup::KeyPressed(TGFrame *f, UInt_t keysym, UInt_t)
196 switch ((EKeySym)keysym) {
201 TGLBEntry *entry =
dynamic_cast<TGLBEntry *
>(f);
203 fListBox->Select(entry->EntryId());
204 SendMessage(fListBox, MK_MSG(kC_CONTAINER, kCT_ITEMCLICK),
205 entry->EntryId(), 0);
212 ((TGContainer *)fListBox->GetContainer())->UnSelectAll();
223 TGComboBox::TGComboBox(
const TGWindow *p, Int_t
id, UInt_t options,
225 TGCompositeFrame (p, 10, 10, options | kOwnBackground, back)
231 fSelEntry =
new TGTextLBEntry(
this,
new TGString(
""), 0);
232 fSelEntry->ChangeOptions(fSelEntry->GetOptions() | kOwnBackground);
234 AddFrame(fSelEntry, fLhs =
new TGLayoutHints(kLHintsLeft |
235 kLHintsExpandY | kLHintsExpandX));
242 TGComboBox::TGComboBox(
const TGWindow *p,
const char *text, Int_t
id,
243 UInt_t options, ULong_t back) :
244 TGCompositeFrame (p, 10, 10, options | kOwnBackground, back)
250 fTextEntry =
new TGTextEntry(
this, text,
id);
251 fTextEntry->SetFrameDrawn(kFALSE);
252 fTextEntry->Connect(
"ReturnPressed()",
"TGComboBox",
this,
"ReturnPressed()");
254 AddFrame(fTextEntry, fLhs =
new TGLayoutHints(kLHintsLeft |
255 kLHintsExpandY | kLHintsExpandX));
262 TGComboBox::~TGComboBox()
264 fClient->FreePicture(fBpic);
266 if (!MustCleanup()) {
267 SafeDelete(fDDButton);
268 SafeDelete(fSelEntry);
269 SafeDelete(fTextEntry);
275 SafeDelete(fListBox);
277 fComboFrame->EndPopup();
278 SafeDelete(fComboFrame);
285 void TGComboBox::Init()
287 fBpic = fClient->GetPicture(
"arrow_down.xpm");
290 Error(
"TGComboBox",
"arrow_down.xpm not found");
292 fDDButton =
new TGScrollBarElement(
this, fBpic, kDefaultScrollBarWidth,
293 kDefaultScrollBarWidth, kRaisedFrame);
295 AddFrame(fDDButton, fLhb =
new TGLayoutHints(kLHintsRight |
298 fComboFrame =
new TGComboBoxPopup(fClient->GetDefaultRoot(), 100, 100, kVerticalFrame);
300 fListBox =
new TGListBox(fComboFrame, fWidgetId, kChildFrame);
302 fListBox->Resize(100, 100);
303 fListBox->Associate(
this);
304 fListBox->GetScrollBar()->GrabPointer(kFALSE);
306 fComboFrame->AddFrame(fListBox, fLhdd =
new TGLayoutHints(kLHintsExpandX |
308 fComboFrame->SetListBox(fListBox);
309 fComboFrame->MapSubwindows();
310 fComboFrame->Resize(fComboFrame->GetDefaultSize());
312 gVirtualX->GrabButton(fId, kButton1, kAnyModifier, kButtonPressMask |
313 kButtonReleaseMask | kPointerMotionMask, kNone, kNone);
315 fListBox->GetContainer()->Connect(
"KeyPressed(TGFrame*, UInt_t, UInt_t)",
316 "TGComboBoxPopup", fComboFrame,
317 "KeyPressed(TGFrame*, UInt_t, UInt_t)");
321 fListBox->GetContainer()->AddInput(kButtonPressMask | kButtonReleaseMask |
324 fListBox->SetEditDisabled(kEditDisable);
325 fListBox->GetContainer()->SetEditDisabled(kEditDisable);
326 if (fSelEntry) fSelEntry->SetEditDisabled(kEditDisable | kEditDisableEvents | kEditDisableGrab);
327 if (fTextEntry) fTextEntry->SetEditDisabled(kEditDisable | kEditDisableGrab | kEditDisableBtnEnable);
328 fDDButton->SetEditDisabled(kEditDisable | kEditDisableGrab);
329 fEditDisabled = kEditDisableLayout | kEditDisableBtnEnable | kEditDisableHeight;
337 void TGComboBox::DrawBorder()
339 switch (fOptions & (kSunkenFrame | kRaisedFrame | kDoubleBorder)) {
340 case kSunkenFrame | kDoubleBorder:
341 gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
342 gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
343 gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, fWidth-3, 1);
344 gVirtualX->DrawLine(fId, GetBlackGC()(), 1, 1, 1, fHeight-3);
345 if (gClient->GetStyle() > 1)
break;
346 gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
347 gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
348 gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
349 gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, 1, fWidth-2, fHeight-2);
353 TGCompositeFrame::DrawBorder();
361 void TGComboBox::EnableTextInput(Bool_t on)
364 const char *text =
"";
365 Pixel_t back = TGFrame::GetWhitePixel();
369 back = fSelEntry->GetBackground();
370 text = ((TGTextLBEntry*)fSelEntry)->GetText()->GetString();
371 if (fTextEntry && fSelEntry->InheritsFrom(TGTextLBEntry::Class())) {
372 fTextEntry->SetText(text);
374 RemoveFrame(fSelEntry);
377 fSelEntry->DestroyWindow();
382 fTextEntry =
new TGTextEntry(
this, text, 0);
383 fTextEntry->SetFrameDrawn(kFALSE);
384 fTextEntry->Connect(
"ReturnPressed()",
"TGComboBox",
this,
"ReturnPressed()");
385 AddFrame(fTextEntry, fLhs);
386 fTextEntry->SetEditDisabled(kEditDisable | kEditDisableGrab | kEditDisableBtnEnable);
388 fTextEntry->SetBackgroundColor(back);
392 GetLayoutManager()->Layout();
395 back = fTextEntry->GetBackground();
396 text = fTextEntry->GetText();
397 RemoveFrame(fTextEntry);
398 fTextEntry->DestroyWindow();
405 fSelEntry =
new TGTextLBEntry(
this,
new TGString(text), 0);
406 fSelEntry->ChangeOptions(fSelEntry->GetOptions() | kOwnBackground);
407 AddFrame(fSelEntry, fLhs);
408 fSelEntry->SetEditDisabled(kEditDisable | kEditDisableGrab);
410 fSelEntry->SetBackgroundColor(back);
414 GetLayoutManager()->Layout();
421 TGLBEntry *TGComboBox::FindEntry(
const char *s)
const
424 sel = fListBox->FindEntry(s);
432 void TGComboBox::SetTopEntry(TGLBEntry *e, TGLayoutHints *lh)
434 if (!fSelEntry)
return;
436 RemoveFrame(fSelEntry);
437 fSelEntry->DestroyWindow();
442 AddFrame(fSelEntry, fLhs);
450 void TGComboBox::Select(Int_t
id, Bool_t emit)
452 if (
id!=GetSelected()) {
454 e = fListBox->Select(
id);
457 fSelEntry->Update(e);
459 }
else if (fTextEntry && e->InheritsFrom(TGTextLBEntry::Class())) {
460 TGTextLBEntry *te = (TGTextLBEntry*)e;
461 fTextEntry->SetText(te->GetText()->GetString());
464 Selected(fWidgetId,
id);
474 Bool_t TGComboBox::HandleButton(Event_t *event)
476 if (!fDDButton || !fDDButton->IsEnabled())
return kFALSE;
478 if (event->fType == kButtonPress) {
479 Window_t child = (Window_t)event->fUser[0];
481 if (child == fDDButton->GetId() || (fSelEntry && child == fSelEntry->GetId())) {
482 fDDButton->SetState(kButtonDown);
484 if (fTextEntry && (child == fTextEntry->GetId())) {
485 return fTextEntry->HandleButton(event);
489 gVirtualX->TranslateCoordinates(fId, fComboFrame->GetParent()->GetId(),
490 0, fHeight, ax, ay, wdummy);
492 fListBox->GetContainer()->AddInput(kPointerMotionMask);
494 gVirtualX->SetWMTransientHint(fComboFrame->GetId(), GetId());
496 fComboFrame->PlacePopup(ax, ay, fWidth-2, fComboFrame->GetDefaultHeight());
497 fDDButton->SetState(kButtonUp);
503 fClient->NeedRedraw(fDDButton);
505 }
else if (fTextEntry) {
506 return fTextEntry->HandleButton(event);
515 void TGComboBox::RemoveEntry(Int_t
id)
517 fListBox->RemoveEntry(
id);
521 ((TGTextLBEntry*)fSelEntry)->SetTitle(
"");
522 fClient->NeedRedraw(fSelEntry);
524 fTextEntry->SetTitle(
"");
525 fClient->NeedRedraw(fTextEntry);
534 void TGComboBox::Layout()
536 TGCompositeFrame::Layout();
537 UInt_t h = fListBox->GetNumberOfEntries()*fListBox->GetItemVsize();
539 if (h && (h < 100)) {
540 fListBox->Resize(fListBox->GetWidth(), h);
547 Bool_t TGComboBox::HandleDoubleClick(Event_t *event)
549 return fTextEntry ? fTextEntry->HandleDoubleClick(event) : kTRUE;
555 Bool_t TGComboBox::HandleMotion(Event_t *event)
557 return fTextEntry ? fTextEntry->HandleMotion(event) : kTRUE;
563 Bool_t TGComboBox::HandleSelection(Event_t *event)
565 return fTextEntry ? fTextEntry->HandleSelection(event) : kTRUE;
571 Bool_t TGComboBox::HandleSelectionRequest(Event_t *event)
573 return fTextEntry ? fTextEntry->HandleSelectionRequest(event) : kTRUE;
581 Bool_t TGComboBox::ProcessMessage(Long_t msg, Long_t, Long_t parm2)
585 switch (GET_MSG(msg)) {
587 switch (GET_SUBMSG(msg)) {
589 e = fListBox->GetSelectedEntry();
591 fSelEntry->Update(e);
592 }
else if (fTextEntry &&
593 e->InheritsFrom(TGTextLBEntry::Class())) {
594 TGTextLBEntry *te = (TGTextLBEntry*)e;
595 fTextEntry->SetText(te->GetText()->GetString());
599 GetLayoutManager()->Layout();
600 fComboFrame->EndPopup();
601 fDDButton->SetState(kButtonUp);
602 SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_COMBOBOX),
604 if (e->InheritsFrom(TGTextLBEntry::Class())) {
606 text = ((TGTextLBEntry*)e)->GetText()->GetString();
609 Selected(fWidgetId, (Int_t)parm2);
610 Selected((Int_t)parm2);
611 fClient->NeedRedraw(
this);
625 void TGComboBox::Selected(Int_t widgetId, Int_t
id)
632 Emit(
"Selected(Int_t,Int_t)", args);
638 void TGComboBox::SetEnabled(Bool_t on)
640 fDDButton->SetEnabled(on);
642 SetFlags(kWidgetIsEnabled);
643 fSelEntry->SetBackgroundColor(GetBackground());
645 ClearFlags(kWidgetIsEnabled);
646 fSelEntry->SetBackgroundColor(GetDefaultFrameBackground());
648 fClient->NeedRedraw(fSelEntry);
655 void TGComboBox::ReturnPressed()
657 if (!fTextEntry)
return;
659 TGLBContainer *lbc = (TGLBContainer *)fListBox->GetContainer();
660 TString text = fTextEntry->GetText();
662 TIter next(lbc->GetList());
665 Emit(
"ReturnPressed()");
667 while ((el = (TGFrameElement *)next())) {
668 TGTextLBEntry *lbe = (TGTextLBEntry *)el->fFrame;
669 if (lbe->GetText()->GetString() == text) {
674 Int_t nn = GetNumberOfEntries() + 1;
675 AddEntry(text.Data(), nn);
682 void TGComboBox::RemoveAll()
684 fListBox->RemoveAll();
687 ((TGTextLBEntry*)fSelEntry)->SetTitle(
"");
688 fClient->NeedRedraw(fSelEntry);
690 fTextEntry->SetTitle(
"");
691 fClient->NeedRedraw(fTextEntry);
698 void TGComboBox::SavePrimitive(std::ostream &out, Option_t *option )
700 if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
702 out << std::endl <<
" // combo box" << std::endl;
703 out <<
" TGComboBox *";
706 out << GetName() <<
" = new TGComboBox(" << fParent->GetName() <<
"," << fWidgetId;
708 out << GetName() <<
" = new TGComboBox(" << fParent->GetName() <<
",";
709 out <<
'\"' << fTextEntry->GetText() <<
'\"' <<
"," <<fWidgetId;
712 if (fBackground == GetWhitePixel()) {
713 if (GetOptions() == (kHorizontalFrame | kSunkenFrame | kDoubleBorder)) {
714 out <<
");" << std::endl;
716 out <<
"," << GetOptionString() <<
");" << std::endl;
719 out <<
"," << GetOptionString() <<
",ucolor);" << std::endl;
721 if (option && strstr(option,
"keep_names"))
722 out <<
" " << GetName() <<
"->SetName(\"" << GetName() <<
"\");" << std::endl;
726 TGListBox *lb = GetListBox();
728 TIter next(((TGLBContainer *)lb->GetContainer())->GetList());
730 while ((el = (TGFrameElement *) next())) {
731 b = (TGTextLBEntry *) el->fFrame;
732 out <<
" " << GetName() <<
"->AddEntry(";
733 b->SavePrimitive(out, option);
734 out <<
");" << std::endl;
737 out <<
" " << GetName() <<
"->Resize(" << GetWidth() <<
","
738 << GetHeight() <<
");" << std::endl;
739 out <<
" " << GetName() <<
"->Select(" << GetSelected() <<
");" << std::endl;
745 TGLineStyleComboBox::TGLineStyleComboBox(
const TGWindow *p, Int_t
id,
746 UInt_t options, Pixel_t back)
747 : TGComboBox(p, id, options, back)
749 SetTopEntry(
new TGLineLBEntry(
this, 0),
750 new TGLayoutHints(kLHintsLeft | kLHintsExpandY | kLHintsExpandX));
751 fSelEntry->ChangeOptions(fSelEntry->GetOptions() | kOwnBackground);
753 for (Int_t i = 1; i <= 10; i++)
754 AddEntry(
new TGLineLBEntry(GetListBox()->GetContainer(), i,
755 TString::Format(
"%d",i), 0, i),
756 new TGLayoutHints(kLHintsTop | kLHintsExpandX));
766 void TGLineStyleComboBox::SavePrimitive(std::ostream &out, Option_t *option )
768 out << std::endl <<
" // line style combo box" << std::endl;
769 out <<
" TGLineStyleComboBox *";
771 out << GetName() <<
" = new TGLineStyleComboBox(" << fParent->GetName()
772 <<
"," << fWidgetId <<
");" << std::endl;
773 if (option && strstr(option,
"keep_names"))
774 out <<
" " << GetName() <<
"->SetName(\"" << GetName() <<
"\");" << std::endl;
775 out <<
" " << GetName() <<
"->Resize(" << GetWidth() <<
","
776 << GetHeight() <<
");" << std::endl;
777 out <<
" " << GetName() <<
"->Select(" << GetSelected() <<
");" << std::endl;
784 TGLineWidthComboBox::TGLineWidthComboBox(
const TGWindow *p, Int_t
id,
785 UInt_t options, Pixel_t back, Bool_t none)
786 : TGComboBox(p, id, options, back)
788 SetTopEntry(
new TGLineLBEntry(
this,0),
789 new TGLayoutHints(kLHintsLeft | kLHintsExpandY | kLHintsExpandX));
790 fSelEntry->ChangeOptions(fSelEntry->GetOptions() | kOwnBackground);
793 AddEntry(
new TGLineLBEntry(GetListBox()->GetContainer(), 0,
"None", 0, 0),
794 new TGLayoutHints(kLHintsTop | kLHintsExpandX));
797 for (Int_t i = 0; i < 16; i++)
798 AddEntry(
new TGLineLBEntry(GetListBox()->GetContainer(), i,
799 TString::Format(
"%d",i), i, 0),
800 new TGLayoutHints(kLHintsTop | kLHintsExpandX));
808 void TGLineWidthComboBox::SavePrimitive(std::ostream &out, Option_t *option )
810 out << std::endl <<
" // line width combo box" << std::endl;
811 out <<
" TGLineWidthComboBox *";
813 out << GetName() <<
" = new TGLineWidthComboBox(" << fParent->GetName()
814 <<
"," << fWidgetId <<
");" << std::endl;
815 if (option && strstr(option,
"keep_names"))
816 out <<
" " << GetName() <<
"->SetName(\"" << GetName() <<
"\");" << std::endl;
817 out <<
" " << GetName() <<
"->Resize(" << GetWidth() <<
","
818 << GetHeight() <<
");" << std::endl;
819 out <<
" " << GetName() <<
"->Select(" << GetSelected() <<
");" << std::endl;
822 static const char *gFonts[][2] = {
824 {
"-*-times-medium-i-*-*-12-*-*-*-*-*-*-*",
"1. times italic" },
825 {
"-*-times-bold-r-*-*-12-*-*-*-*-*-*-*",
"2. times bold" },
826 {
"-*-times-bold-i-*-*-12-*-*-*-*-*-*-*",
"3. times bold italic" },
827 {
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*",
"4. helvetica" },
828 {
"-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-*",
"5. helvetica italic" },
829 {
"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*",
"6. helvetica bold" },
830 {
"-*-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*",
"7. helvetica bold italic" },
831 {
"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-*",
"8. courier" },
832 {
"-*-courier-medium-o-*-*-12-*-*-*-*-*-*-*",
"9. courier italic" },
833 {
"-*-courier-bold-r-*-*-12-*-*-*-*-*-*-*",
"10. courier bold" },
834 {
"-*-courier-bold-o-*-*-12-*-*-*-*-*-*-*",
"11. courier bold italic" },
835 {
"-*-symbol-medium-r-*-*-12-*-*-*-*-*-*-*",
"12. symbol" },
836 {
"-*-times-medium-r-*-*-12-*-*-*-*-*-*-*",
"13. times" },
843 TGFontTypeComboBox::TGFontTypeComboBox(
const TGWindow *p, Int_t
id,
844 UInt_t options, Pixel_t back) :
845 TGComboBox(p, id, options, back)
849 for (Int_t i = 1; gFonts[i][0] != 0 && noFonts < kMaxFonts; i++) {
851 fFonts[noFonts] = gVirtualX->LoadQueryFont(gFonts[i][0]);
853 if (fFonts[noFonts] == 0)
854 fFonts[noFonts] = TGTextLBEntry::GetDefaultFontStruct();
857 gval.fMask = kGCFont;
858 gval.fFont = gVirtualX->GetFontHandle(fFonts[noFonts]);
860 AddEntry(
new TGTextLBEntry(GetListBox()->GetContainer(),
861 new TGString(gFonts[i][1]), i,
862 fClient->GetGC(&gval, kTRUE)->GetGC(), fFonts[noFonts]),
863 new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX));
867 if (noFonts < kMaxFonts - 1)
877 TGFontTypeComboBox::~TGFontTypeComboBox()
879 for (
int i = 0; i < kMaxFonts && fFonts[i] != 0; i++) {
880 if (fFonts[i] != TGTextLBEntry::GetDefaultFontStruct()) gVirtualX->DeleteFont(fFonts[i]);