library: libGuiBld #include "TGuiBldDragManager.h" |
TGuiBldDragManager
class description - header file - source file - inheritance tree (.pdf)
private:
void AddClassMenuMethods(TGPopupMenu* menu, TObject* object)
void AddDialogMethods(TGPopupMenu* menu, TObject* object)
void BreakLayout()
virtual Bool_t Cancel(Bool_t delSrc)
Bool_t CanChangeLayout(TGWindow* w) const
Bool_t CanChangeLayoutOrder(TGWindow* w) const
Bool_t CanCompact(TGWindow* w) const
void ChangeSelected(TGFrame* f)
Bool_t CheckDragResize(Event_t* event)
Bool_t CheckTargetAtPoint(Int_t x, Int_t y)
void CheckTargetUnderGrab()
void CloneEditable()
void CloseMenus()
void Compact(Bool_t global = kTRUE)
void CreateListOfDialogs()
void CreatePropertyEditor()
void DeleteFrame(TGFrame* frame)
void DeleteMenuDialog()
void DeletePropertyEditor()
void DoMove()
virtual void DoRedraw()
void DoReplace(TGFrame* frame)
void DoResize()
void DrawGrabRect(Int_t i, Int_t x, Int_t y)
void DrawGrabRectangles(TGWindow* win = 0)
void DrawLasso()
virtual Bool_t Drop()
void DropCanvas(TGCanvas* canvas)
virtual Bool_t EndDrag()
TGCompositeFrame* FindCompositeFrame(Window_t id)
TGCompositeFrame* FindLayoutFrame(TGFrame* f)
TGFrame* FindMdiFrame(TGFrame* in)
TGFrame* GetBtnEnableParent(TGFrame* fr)
TGFrame* GetEditableParent(TGFrame* f)
TList* GetFramesInside(Int_t x0, Int_t y0, Int_t x, Int_t y)
static TGColorDialog* GetGlobalColorDialog(Bool_t create = kTRUE)
static TGFontDialog* GetGlobalFontDialog()
TGFrame* GetMovableParent(TGWindow* p)
TGWindow* GetResizableParent(TGWindow* p)
void GrabFrame(TGFrame* frame)
void HandleAlignment(Int_t to, Bool_t lineup = kFALSE)
void HandleButon3Pressed(Event_t*, TGFrame* frame = 0)
virtual Bool_t HandleButton(Event_t*)
Bool_t HandleButtonPress(Event_t*)
Bool_t HandleButtonRelease(Event_t*)
virtual Bool_t HandleClientMessage(Event_t*)
virtual Bool_t HandleConfigureNotify(Event_t*)
void HandleCopy(Bool_t brk_layout = kTRUE)
void HandleCut()
void HandleDelete(Bool_t crop = kFALSE)
Bool_t HandleDestroyNotify(Event_t*)
virtual Bool_t HandleDoubleClick(Event_t*)
virtual Bool_t HandleEvent(Event_t*)
virtual Bool_t HandleExpose(Event_t*)
void HandleGrid()
void HandleLayoutOrder(Bool_t forward = kTRUE)
virtual Bool_t HandleMotion(Event_t*)
void HandlePaste()
void HandleReplace()
void HandleReturn(Bool_t on = kFALSE)
virtual Bool_t HandleSelection(Event_t*)
virtual Bool_t HandleSelectionRequest(Event_t*)
virtual Bool_t HandleTimer(TTimer*)
void HideGrabRectangles()
void HighlightCompositeFrame(Window_t)
virtual Bool_t IgnoreEvent(Event_t* e)
TGFrame* InEditable(Window_t id)
Bool_t IsEditDisabled(TGWindow* f) const
Bool_t IsEventsDisabled(TGWindow* f) const
Bool_t IsFixedH(TGWindow* f) const
Bool_t IsFixedLayout(TGWindow* f) const
Bool_t IsFixedSize(TGWindow* f) const
Bool_t IsFixedW(TGWindow* f) const
Bool_t IsGrabDisabled(TGWindow* f) const
Bool_t IsLassoDrawn() const
Bool_t IsMoveWaiting() const
Bool_t IsPasteFrameExist()
Bool_t IsPointVisible(Int_t x, Int_t y)
Bool_t IsSelectedVisible()
static void MapGlobalDialog(TGMainFrame* dialog, TGFrame* fr)
void Menu4Frame(TGFrame*, Int_t x, Int_t y)
void Menu4Lasso(Int_t x, Int_t y)
void PlaceFrame(TGFrame*, TGLayoutHints*)
void PutToCanvas(TGCompositeFrame* cont)
void RaiseMdiFrame(TGFrame* in)
Bool_t RecognizeGesture(Event_t*, TGFrame* frame = 0)
void ReparentFrames(TGFrame* newfr, TGCompositeFrame* oldfr)
void Reset1()
Bool_t Save(const char* file = "")
Bool_t SaveFrame(const char* file = "0")
void SelectFrame(TGFrame* frame, Bool_t add = kFALSE)
void SetCursorType(Int_t cur)
void SetLassoDrawn(Bool_t on)
void SetPropertyEditor(TGuiBldEditor* e)
virtual Bool_t StartDrag(TGFrame* src, Int_t x, Int_t y)
void SwitchEditable(TGFrame* frame)
void SwitchLayout()
void ToGrid(Int_t& x, Int_t& y)
void UngrabFrame()
void UnmapAllPopups()
public:
TGuiBldDragManager()
TGuiBldDragManager(const TGuiBldDragManager&)
virtual ~TGuiBldDragManager()
void ChangeBackgroundColor(TGListBox*)
void ChangeBackgroundColor(TGCanvas*)
void ChangeBackgroundColor(TGComboBox*)
void ChangeBackgroundColor(TGFrame*)
void ChangeBackgroundColor(TGCompositeFrame*)
void ChangeBarColor(TGProgressBar*)
void ChangeImage(TGIcon*)
void ChangePicture(TGPictureButton*)
void ChangeProperties(TGLabel*)
void ChangeProperties(TGTextButton*)
void ChangeTextColor(TGGroupFrame*)
void ChangeTextColor(TGLabel*)
void ChangeTextColor(TGTextButton*)
void ChangeTextColor(TGProgressBar*)
void ChangeTextColor(TGTextEntry*)
void ChangeTextFont(TGGroupFrame*)
void ChangeTextFont(TGTextEntry*)
static TClass* Class()
void DoClassMenu(Int_t)
void DoDialogApply()
void DoDialogCancel()
void DoDialogOK()
Bool_t GetDropStatus() const
virtual Int_t GetEndDragX() const
virtual Int_t GetEndDragY() const
UInt_t GetGridStep()
TGFrame* GetSelected() const
virtual Int_t GetStrartDragX() const
virtual Int_t GetStrartDragY() const
TGFrame* GetTarget() const
void HandleAction(Int_t act)
virtual Bool_t HandleKey(Event_t*)
void HandleUpdateSelected(TGFrame*)
virtual TClass* IsA() const
Bool_t IsStopped() const
void SetBuilder(TRootGuiBuilder* b)
virtual void SetEditable(Bool_t on = kTRUE)
void SetGridStep(UInt_t step)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
void Snap2Grid()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TGuiBldDragManagerPimpl* fPimpl private data
TRootGuiBuilder* fBuilder pointer to gui builder
TGuiBldEditor* fEditor frame property editor
Bool_t fLassoDrawn kTRUE if lasso drawn
TString fPasteFileName paste_clippboard file name
TString fTmpBuildFile temporary file name
Bool_t fSelectionIsOn selection with Shift key pressed
TGPopupMenu* fFrameMenu context menu for frames
TGPopupMenu* fLassoMenu context menu for lasso drawn
Window_t fTargetId an id of window where drop
Bool_t fDropStatus kTRUE if drop was successfull
Bool_t fStop kTRUE if stopped
TGFrame* fSelected selected frame. In most cases selected is
TList* fListOfDialogs list of dialog methods
static TGColorDialog* fgGlobalColorDialog color dialog
static TGFontDialog* fgGlobalFontDialog font dialog
void Reset1()
Reset some parameters
void Snap2Grid()
Draw grid on editable frame and restore background on previuosly editted one
void DoRedraw()
Redraw the editted window
void UngrabFrame()
Ungrab/Unselect selected/grabbed frame.
void HighlightCompositeFrame(Window_t win)
Raise composite frame when mouse is moving over it.
That allows to highlight position of "plain" composite frames.
Bool_t HandleTimer(TTimer *t)
The main event loop is originated here
It repeadeatly queries pointer state and position on the screen.
From this info an Event_t structure is built.
void HandleReturn(Bool_t on)
Handling of return/enter key pressing
If on is kFALSE:
If Return or Enter key was pressed - Grab Act
If lasso is drawn - new composite frame is created and
all frames inside lasso adopted as childrens.
If lasso is not drawn and selected frame is composite one,
- new TGCanvas widget is created and selcted frmae became
container for this canvas.
If on is kTRUE:
If Return or Enter key was pressed with Control Key - Drop Act,
The opposite action to the Grab Act.
If selected/grabbed frame is not a TGCanvas widget -
all frames inside the grabbed/selected frame are "dropped" into
the underlying frame and the grabbed frame is deleted.
If selected/grabbed frame is a TGCanvas widget -
container frame "dropped" to editable frame
void HandleDelete(Bool_t crop)
Handle delete or crop action
crop is kFALSE - delete action
- if lasso is drawn -> all frames inside lasso area are deleted
- if frame is grabbed/selected -> the frame is deleted
crop is kTRUE - crop action
- if lasso is drawn -> all frames outside of lasso area are deleted
- if frame is grabbed/selected -> all frames except the grabbed frame are deleted
In both cases the main frame is shrinked to the size of crop area.
void CloneEditable()
Create a frame which is the same as currently editted frame
Bool_t IsMoveWaiting()
Waits for either the mouse move from the given initial ButtonPress location
or for the mouse button to be released. If mouse moves away from the initial
ButtonPress location before the mouse button is released "IsMoveWaiting"
returns kTRUE. If the mouse button released before the mose moved from the
initial ButtonPress location, "IsMoveWaiting" returns kFALSE.
void ToGrid(Int_t &x, Int_t &y)
Return grid coordinates which are close to given
void CreatePropertyEditor()
Create widget property editor (it could be located outside of guibuilder)
void BreakLayout()
Disable/Enable layout for selected/grabbed composite frame.
void SwitchLayout()
Switch Horizontal/Vertical layout of selected/grabbed composite frame
void DoDialogOK()
Process dialog OK button pressed
void ChangeBackgroundColor(TGCompositeFrame *fr)
Change background color via context menu for this frame and all subframes.
This method is activated via context menu during guibuilding.
void ChangeTextColor(TGGroupFrame *fr)
Change text color via color selection dialog. This method is activated
via context menu during guibuilding.
void ChangeTextFont(TGGroupFrame *fr)
Change text font via font selection dialog. This method is activated
via context menu during guibuilding.
void ChangeProperties(TGTextButton *fr)
Edit properties via font selection dialog. This method is activated
via context menu during guibuilding.
void ChangeTextColor(TGTextButton *fr)
Change text color via color selection dialog. This method is activated
via context menu during guibuilding.
void ChangePicture(TGPictureButton *fr)
Invoke file dialog to assign a new picture.
This method is activated via context menu during guibuilding.
void ChangeProperties(TGLabel *fr)
Edit properties via font selection dialog. This method is activated
via context menu during guibuilding.
void ChangeTextColor(TGLabel *fr)
Change text color via color selection dialog. This method is activated
via context menu during guibuilding.
void ChangeTextFont(TGTextEntry *fr)
Change text font via font selection dialog. This method is activated
via context menu during guibuilding.
void ChangeImage(TGIcon *fr)
Invoke file dialog to assign a new image.
This method is activated via context menu during guibuilding.
Author: Valeriy Onuchin 12/09/04
Last update: root/guibuilder:$Name: $:$Id: TGuiBldDragManager.cxx,v 1.51 2006/07/05 07:02:22 brun Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.