GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TWebCanvasFull Class Reference

#include <TWebCanvasFull.h>

+ Inheritance diagram for TWebCanvasFull:

Public Types

using PadSignal_t = std::function< void(TPad *)>
 Function type for pad-related signals - like click or double click. More...
 
using PadClickedSignal_t = std::function< void(TPad *, int, int)>
 Function type for pad-click signals. More...
 
using ObjectSelectSignal_t = std::function< void(TPad *, TObject *)>
 Function type for signals, invoked when object is selected. More...
 

Public Member Functions

 TWebCanvasFull (TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
 constructor More...
 
Bool_t IsReadOnly () const override
 
void SetCanCreateObjects (Bool_t on=kTRUE)
 
void SetActivePadChangedHandler (PadSignal_t func)
 
void SetPadClickedHandler (PadClickedSignal_t func)
 
void SetPadDblClickedHandler (PadClickedSignal_t func)
 
void SetObjSelectHandler (ObjectSelectSignal_t func)
 

Protected Member Functions

Bool_t ProcessData (unsigned connid, const std::string &arg) override
 Process reply from client, which is not processed by basic TWebCanvas. More...
 
Bool_t DecodePadOptions (const std::string &) override
 Decode all pad options, which includes ranges plus objects options. More...
 
TPad * ProcessObjectOptions (TWebObjectOptions &item, TPad *pad)
 
TObject * FindPrimitive (const std::string &id, TPad *pad=nullptr, TObjLink **padlnk=nullptr, TPad **objpad=nullptr)
 
Bool_t CanCreateObject (const std::string &) override
 

Protected Attributes

PadSignal_t fActivePadChangedSignal
 ! signal emitted when active pad changed in the canvas More...
 
PadClickedSignal_t fPadClickedSignal
 ! signal emitted when simple mouse click performed on the pad More...
 
PadClickedSignal_t fPadDblClickedSignal
 ! signal emitted when simple mouse click performed on the pad More...
 
ObjectSelectSignal_t fObjSelectSignal
 ! signal emitted when new object selected in the pad More...
 
Bool_t fCanCreateObjects kTRUE
 ! indicates if canvas allowed to create extra objects for interactive painting More...
 

Detailed Description

Definition at line 30 of file TWebCanvasFull.h.

Member Typedef Documentation

using TWebCanvasFull::ObjectSelectSignal_t = std::function<void(TPad *, TObject *)>

Function type for signals, invoked when object is selected.

Definition at line 39 of file TWebCanvasFull.h.

using TWebCanvasFull::PadClickedSignal_t = std::function<void(TPad *, int, int)>

Function type for pad-click signals.

Definition at line 36 of file TWebCanvasFull.h.

using TWebCanvasFull::PadSignal_t = std::function<void(TPad *)>

Function type for pad-related signals - like click or double click.

Definition at line 33 of file TWebCanvasFull.h.

Constructor & Destructor Documentation

TWebCanvasFull::TWebCanvasFull ( TCanvas *  c,
const char *  name,
Int_t  x,
Int_t  y,
UInt_t  width,
UInt_t  height 
)

constructor

Definition at line 19 of file TWebCanvasFull.cxx.

Member Function Documentation

Bool_t TWebCanvasFull::CanCreateObject ( const std::string &  )
inlineoverrideprotected

Definition at line 57 of file TWebCanvasFull.h.

Bool_t TWebCanvasFull::DecodePadOptions ( const std::string &  msg)
overrideprotected

Decode all pad options, which includes ranges plus objects options.

Definition at line 283 of file TWebCanvasFull.cxx.

References FindPrimitive(), kTRUE, go4init::msg, and ProcessObjectOptions().

TObject * TWebCanvasFull::FindPrimitive ( const std::string &  sid,
TPad *  pad = nullptr,
TObjLink **  padlnk = nullptr,
TPad **  objpad = nullptr 
)
protected

search of object with given id in list of primitives One could specify pad where search could be start Also if object is in list of primitives, one could ask for entry link for such object, This can allow to change draw option

Definition at line 31 of file TWebCanvasFull.cxx.

Referenced by DecodePadOptions(), ProcessData(), and ProcessObjectOptions().

Bool_t TWebCanvasFull::IsReadOnly ( ) const
inlineoverride

Definition at line 62 of file TWebCanvasFull.h.

Referenced by ProcessData().

Bool_t TWebCanvasFull::ProcessData ( unsigned  connid,
const std::string &  arg 
)
overrideprotected

Process reply from client, which is not processed by basic TWebCanvas.

Definition at line 137 of file TWebCanvasFull.cxx.

References fActivePadChangedSignal, FindPrimitive(), fObjSelectSignal, fPadClickedSignal, fPadDblClickedSignal, IsReadOnly(), kTRUE, TWebMenuItems::PopulateObjectMenu(), and ProcessObjectOptions().

TPad * TWebCanvasFull::ProcessObjectOptions ( TWebObjectOptions item,
TPad *  pad 
)
protected

Process data for single primitive Returns object pad if object was modified

Definition at line 392 of file TWebCanvasFull.cxx.

References TWebObjectOptions::fcust, FindPrimitive(), TWebObjectOptions::fopt, TWebObjectOptions::opt, and TWebObjectOptions::snapid.

Referenced by DecodePadOptions(), and ProcessData().

void TWebCanvasFull::SetActivePadChangedHandler ( PadSignal_t  func)
inline

Definition at line 66 of file TWebCanvasFull.h.

Referenced by QWebCanvas::QWebCanvas().

void TWebCanvasFull::SetCanCreateObjects ( Bool_t  on = kTRUE)
inline

Definition at line 64 of file TWebCanvasFull.h.

Referenced by QWebCanvas::QWebCanvas().

void TWebCanvasFull::SetObjSelectHandler ( ObjectSelectSignal_t  func)
inline

Definition at line 72 of file TWebCanvasFull.h.

void TWebCanvasFull::SetPadClickedHandler ( PadClickedSignal_t  func)
inline

Definition at line 68 of file TWebCanvasFull.h.

Referenced by QWebCanvas::QWebCanvas().

void TWebCanvasFull::SetPadDblClickedHandler ( PadClickedSignal_t  func)
inline

Definition at line 70 of file TWebCanvasFull.h.

Referenced by QWebCanvas::QWebCanvas().

Member Data Documentation

PadSignal_t TWebCanvasFull::fActivePadChangedSignal
protected

! signal emitted when active pad changed in the canvas

Definition at line 43 of file TWebCanvasFull.h.

Referenced by ProcessData().

ObjectSelectSignal_t TWebCanvasFull::fObjSelectSignal
protected

! signal emitted when new object selected in the pad

Definition at line 46 of file TWebCanvasFull.h.

Referenced by ProcessData().

PadClickedSignal_t TWebCanvasFull::fPadClickedSignal
protected

! signal emitted when simple mouse click performed on the pad

Definition at line 44 of file TWebCanvasFull.h.

Referenced by ProcessData().

PadClickedSignal_t TWebCanvasFull::fPadDblClickedSignal
protected

! signal emitted when simple mouse click performed on the pad

Definition at line 45 of file TWebCanvasFull.h.

Referenced by ProcessData().

Bool_t fCanCreateObjects TWebCanvasFull::kTRUE
protected

! indicates if canvas allowed to create extra objects for interactive painting

Definition at line 47 of file TWebCanvasFull.h.

Referenced by DecodePadOptions(), and ProcessData().


The documentation for this class was generated from the following files: