Logo ROOT  
Reference Guide
TGedMarkerSelect.h
Go to the documentation of this file.
1// @(#)root/ged:$Id$
2// Author: Marek Biskup, Ilka Antcheva 24/07/03
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGedMarkerSelect
13#define ROOT_TGedMarkerSelect
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TGedMarkerPopup and TGedMarkerSelect. //
18// //
19// The TGedMarkerPopup is a popup containing all diferent styles of //
20// markers. //
21// //
22// The TGedMarkerSelect widget is a button with marker drawn inside //
23// and a little down arrow. When clicked the TGMarkerPopup. //
24// //
25// Selecting a marker in this widget will generate the event: //
26// kC_MARKERSEL, kMAR_SELCHANGED, widget id, pixel. //
27// //
28// and the signal: //
29// MarkerSelected(Style_t marker) //
30// //
31//////////////////////////////////////////////////////////////////////////
32
33#include "TGedPatternSelect.h"
34
35class TGToolTip;
36class TGPicture;
37
38
39class TGedMarkerPopup : public TGedPopup {
40
41protected:
42 Style_t fCurrentStyle; //currently selected style
43
44public:
45 TGedMarkerPopup(const TGWindow *p, const TGWindow *m, Style_t markerStyle);
46 virtual ~TGedMarkerPopup();
47
48 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
49
50 ClassDef(TGedMarkerPopup,0) //marker select popup
51};
52
53
55
56protected:
57 Style_t fMarkerStyle; //marker style
58 const TGPicture *fPicture; //image used for popup window
59
60 virtual void DoRedraw();
61
62public:
63 TGedMarkerSelect(const TGWindow *p, Style_t markerStyle, Int_t id);
64 virtual ~TGedMarkerSelect() { if(fPicture) gClient->FreePicture(fPicture);}
65
66 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
69 virtual void MarkerSelected(Style_t marker = 0) { Emit("MarkerSelected(Style_t)", marker ? marker : GetMarkerStyle()); } // *SIGNAL*
70 virtual void SavePrimitive(std::ostream &out, Option_t * = "");
71 virtual TGDimension GetDefaultSize() const { return TGDimension(38, 21); }
72
73 ClassDef(TGedMarkerSelect,0) // Marker selection button
74};
75
76#endif
long Long_t
Definition: RtypesCore.h:52
bool Bool_t
Definition: RtypesCore.h:61
short Style_t
Definition: RtypesCore.h:78
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
#define gClient
Definition: TGClient.h:166
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by the marker popup window.
TGedMarkerPopup(const TGWindow *p, const TGWindow *m, Style_t markerStyle)
Create marker popup window.
virtual ~TGedMarkerPopup()
Destructor.
void SetMarkerStyle(Style_t pattern)
Set marker.
virtual TGDimension GetDefaultSize() const
default size
virtual void DoRedraw()
Draw selected marker type as current one.
Style_t GetMarkerStyle() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the pattern select widget as a C++ statement(s) on output stream out.
const TGPicture * fPicture
virtual ~TGedMarkerSelect()
virtual void MarkerSelected(Style_t marker=0)
TGedMarkerSelect(const TGWindow *p, Style_t markerStyle, Int_t id)
Create and show marker popup window.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages according to the user input.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
static const std::string pattern("pattern")
auto * m
Definition: textangle.C:8