Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGtk4GuiFactory.cxx
Go to the documentation of this file.
1// Author: Sergey Linev 12/08/2026
2
3/*************************************************************************
4 * Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11
12/** \class TGtk4GuiFactory
13 \ingroup gtk4canvas
14
15This class is a factory for ROOT GUI components.
16For Gtk4 it provides specialization for TCanvasImp and TContextMenuImp classes
17*/
18
19
20#include "TGtk4GuiFactory.h"
21
22#include "TGtk4Canvas.h"
23#include "TGtk4ContextMenu.h"
24
25using namespace ROOT::Experimental;
26
27////////////////////////////////////////////////////////////////////////////////
28/// TGtk4GuiFactory ctor.
29
30TGtk4GuiFactory::TGtk4GuiFactory(const char *name, const char *title)
31 : TGuiFactory(name, title)
32{
33}
34
35////////////////////////////////////////////////////////////////////////////////
36/// Create a ROOT native GUI version of TApplicationImp
37
39 Int_t *argc, char **argv)
40{
41 return TGuiFactory::CreateApplicationImp(classname, argc, argv);
42}
43
44////////////////////////////////////////////////////////////////////////////////
45/// Create a ROOT native GUI version of TCanvasImp
46
49{
50 return TGtk4Canvas::NewCanvas(c, title, -1, -1, width, height);
51}
52
53////////////////////////////////////////////////////////////////////////////////
54/// Create a ROOT native GUI version of TCanvasImp
55
61
62////////////////////////////////////////////////////////////////////////////////
63/// Create a ROOT native GUI version of TContextMenuImp
64
66 const char *name, const char *)
67{
68 return new TGtk4ContextMenu(c, name);
69}
#define c(i)
Definition RSha256.hxx:101
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
char name[80]
Definition TGX11.cxx:142
static TCanvasImp * NewCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
Static method to create TGtk4Canvas instance Used by plugin manager to directly create TGtk4Canvas wi...
TContextMenuImp * CreateContextMenuImp(TContextMenu *c, const char *name, const char *title) override
Create a ROOT native GUI version of TContextMenuImp.
TApplicationImp * CreateApplicationImp(const char *classname, int *argc, char **argv) override
Create a ROOT native GUI version of TApplicationImp.
TCanvasImp * CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height) override
Create a ROOT native GUI version of TCanvasImp.
ABC describing GUI independent application implementation protocol.
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition TCanvasImp.h:31
The Canvas class.
Definition TCanvas.h:23
This class provides an interface to GUI independent context sensitive popup menus.
This class provides an interface to context sensitive popup menus.
This class provides an interface to context-sensitive popup menus.
This ABC is a factory for GUI components.
Definition TGuiFactory.h:42
virtual TApplicationImp * CreateApplicationImp(const char *classname, int *argc, char **argv)
Create a batch version of TApplicationImp.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Namespace for ROOT features in testing.
Definition TROOT.h:100