ROOT logo
// @(#)root/ged:$Id: TGedMarkerSelect.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Marek Biskup, Ilka Antcheva   24/07/03

/*************************************************************************
 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGedMarkerSelect
#define ROOT_TGedMarkerSelect

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGedMarkerPopup and TGedMarkerSelect.                                //
//                                                                      //
// The TGedMarkerPopup is a popup containing all diferent styles of     //
// markers.                                                             //
//                                                                      //
// The TGedMarkerSelect widget is a button with marker drawn inside     //
// and a little down arrow. When clicked the TGMarkerPopup.             //
//                                                                      //
// Selecting a marker in this widget will generate the event:           //
// kC_MARKERSEL, kMAR_SELCHANGED, widget id, pixel.                     //
//                                                                      //
// and the signal:                                                      //
// MarkerSelected(Style_t marker)                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGedPatternSelect
#include "TGedPatternSelect.h"
#endif

class TGToolTip;
class TGPicture;


class TGedMarkerPopup : public TGedPopup {

protected:
   Style_t  fCurrentStyle;     //currently selected style

public:
   TGedMarkerPopup(const TGWindow *p, const TGWindow *m, Style_t markerStyle);
   virtual ~TGedMarkerPopup();

   virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);

   ClassDef(TGedMarkerPopup,0)  //marker select popup
};


class TGedMarkerSelect : public TGedSelect {

protected:
   Style_t          fMarkerStyle;   //marker style
   const TGPicture *fPicture;       //image used for popup window

   virtual void     DoRedraw();

public:
   TGedMarkerSelect(const TGWindow *p, Style_t markerStyle, Int_t id);
   virtual ~TGedMarkerSelect() { if(fPicture) gClient->FreePicture(fPicture);}

   virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
   Style_t        GetMarkerStyle() const { return fMarkerStyle; }
   void           SetMarkerStyle(Style_t pattern);
   virtual void   MarkerSelected(Style_t marker = 0) { Emit("MarkerSelected(Style_t)", marker ? marker : GetMarkerStyle()); }  // *SIGNAL*
   virtual void   SavePrimitive(ostream &out, Option_t * = "");
   virtual TGDimension GetDefaultSize() const { return TGDimension(38, 21); }

   ClassDef(TGedMarkerSelect,0)  // Marker selection button
};

#endif
 TGedMarkerSelect.h:1
 TGedMarkerSelect.h:2
 TGedMarkerSelect.h:3
 TGedMarkerSelect.h:4
 TGedMarkerSelect.h:5
 TGedMarkerSelect.h:6
 TGedMarkerSelect.h:7
 TGedMarkerSelect.h:8
 TGedMarkerSelect.h:9
 TGedMarkerSelect.h:10
 TGedMarkerSelect.h:11
 TGedMarkerSelect.h:12
 TGedMarkerSelect.h:13
 TGedMarkerSelect.h:14
 TGedMarkerSelect.h:15
 TGedMarkerSelect.h:16
 TGedMarkerSelect.h:17
 TGedMarkerSelect.h:18
 TGedMarkerSelect.h:19
 TGedMarkerSelect.h:20
 TGedMarkerSelect.h:21
 TGedMarkerSelect.h:22
 TGedMarkerSelect.h:23
 TGedMarkerSelect.h:24
 TGedMarkerSelect.h:25
 TGedMarkerSelect.h:26
 TGedMarkerSelect.h:27
 TGedMarkerSelect.h:28
 TGedMarkerSelect.h:29
 TGedMarkerSelect.h:30
 TGedMarkerSelect.h:31
 TGedMarkerSelect.h:32
 TGedMarkerSelect.h:33
 TGedMarkerSelect.h:34
 TGedMarkerSelect.h:35
 TGedMarkerSelect.h:36
 TGedMarkerSelect.h:37
 TGedMarkerSelect.h:38
 TGedMarkerSelect.h:39
 TGedMarkerSelect.h:40
 TGedMarkerSelect.h:41
 TGedMarkerSelect.h:42
 TGedMarkerSelect.h:43
 TGedMarkerSelect.h:44
 TGedMarkerSelect.h:45
 TGedMarkerSelect.h:46
 TGedMarkerSelect.h:47
 TGedMarkerSelect.h:48
 TGedMarkerSelect.h:49
 TGedMarkerSelect.h:50
 TGedMarkerSelect.h:51
 TGedMarkerSelect.h:52
 TGedMarkerSelect.h:53
 TGedMarkerSelect.h:54
 TGedMarkerSelect.h:55
 TGedMarkerSelect.h:56
 TGedMarkerSelect.h:57
 TGedMarkerSelect.h:58
 TGedMarkerSelect.h:59
 TGedMarkerSelect.h:60
 TGedMarkerSelect.h:61
 TGedMarkerSelect.h:62
 TGedMarkerSelect.h:63
 TGedMarkerSelect.h:64
 TGedMarkerSelect.h:65
 TGedMarkerSelect.h:66
 TGedMarkerSelect.h:67
 TGedMarkerSelect.h:68
 TGedMarkerSelect.h:69
 TGedMarkerSelect.h:70
 TGedMarkerSelect.h:71
 TGedMarkerSelect.h:72
 TGedMarkerSelect.h:73
 TGedMarkerSelect.h:74
 TGedMarkerSelect.h:75
 TGedMarkerSelect.h:76
 TGedMarkerSelect.h:77
 TGedMarkerSelect.h:78