JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGPrintRequester.hh>
Public Member Functions | |
RGPrintRequester (const TGWindow *parent, const TGWindow *main, string &command, int &result, const char *title, const char *message="", const char *buttons=rDico.prrq_print_buttons.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGPrintRequester (const TGWindow *parent, const TGWindow *main, const string &fname, string &command, int &result, const char *title, const char *message="", const char *buttons=rDico.prrq_print_buttons.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGPrintRequester (const TGWindow *parent, const TGWindow *main, const string &fname, const char *title, const char *message="", const char *buttons=rDico.prrq_print_buttons.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGPrintRequester (const TGWindow *parent, const TGWindow *main, TPad *pad, const char *title, const char *message="", const char *buttons=rDico.prrq_print_buttons.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
virtual | ~RGPrintRequester () |
virtual void | Construct () |
virtual void | Button (const int n) |
ClassDef (RGPrintRequester, 0) | |
![]() | |
RGMessageRequester (const TGWindow *parent, const TGWindow *main, int &result, const char *title, const char *message, const ULong_t text_align=kLHintsCenterX|kLHintsExpandX, const char *buttons=rDico.brq_continue.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGMessageRequester (const TGWindow *parent, const TGWindow *main, const char *title, const char *message, const ULong_t text_align=kLHintsCenterX|kLHintsExpandX, const char *buttons=rDico.brq_continue.c_str(), const ULong_t opts=0, const bool auto_start=false) | |
virtual | ~RGMessageRequester () |
ClassDef (RGMessageRequester, 0) | |
![]() | |
RGBaseRequester (const TGWindow *parent, const TGWindow *main, int &result, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGBaseRequester (const TGWindow *parent, const TGWindow *main, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const bool auto_start=false) | |
virtual | ~RGBaseRequester () |
virtual void | MapRequester () |
virtual void | Request () |
virtual TGCompositeFrame * | GetFrame () const |
virtual TGHorizontalFrame * | GetHFrame () const |
virtual TGVerticalFrame * | GetVFrame () const |
virtual void | AddFrame (TGFrame *f, TGLayoutHints *l=0) |
virtual void | CloseFromButton () |
virtual void | CancelClose (const Bool_t b=kTRUE) |
virtual void | ReqButtonClicked (Int_t n) |
virtual void | ProcessedEvent (Event_t *event) |
virtual void | Button (Int_t n) |
virtual void | Quit () |
ClassDef (RGBaseRequester, 0) | |
Static Public Member Functions | |
static string | GetCommand () |
static Double_t | GetSizeX () |
static Double_t | GetSizeY () |
static Int_t | GetOrientation () |
static string | GetPrintOptions () |
static void | SetCommand (const string &cmd) |
static void | SetSizeX (const Double_t x) |
static void | SetSizeY (const Double_t y) |
static void | SetOrientation (const Int_t opt) |
static string | GetPrintCommand (const string &fname) |
static void | Print (const string &fname) |
static void | Print (TPad *pad) |
Private Member Functions | |
GObject (RGPrintRequester) | |
RGPrintRequester (const RGPrintRequester &req) | |
Private Attributes | |
string * | print_command |
Result print command pointer. | |
bool | exec_print |
Flag if command must be executed (printing) | |
string | file_name |
File name to print. | |
TPad * | pad_ptr |
Pointer to pad to print. | |
RGPadPrintCommand * | w_print_cmd |
Print command widget. | |
Static Private Attributes | |
static string | default_command = "lpr %f" |
Print command. | |
static Double_t | default_size_x = 18. |
Paper width. | |
static Double_t | default_size_y = 26. |
Paper height. | |
static Int_t | default_orientation = 0 |
Paper orientation. | |
Additional Inherited Members | |
![]() | |
RGMessageRequester (const RGMessageRequester &req) | |
![]() | |
RGBaseRequester (const RGBaseRequester &req) | |
![]() | |
int * | result_adr |
Request resul pointer. | |
string | req_title |
Request title. | |
const char * | req_buttons |
Buttons texts. | |
UInt_t | options |
Request options. | |
ULong_t | req_button_layout |
Buttons layout. | |
TGCompositeFrame * | w_widget_frame |
Frame for widgets. | |
TGCompositeFrame * | w_buttons_frame |
Frame for buttons. | |
TList | buttons_list |
List of created buttons. | |
Bool_t | cancel_close |
Check for close cancellation. | |
![]() | |
static UInt_t | max_width = 1200 |
Maximum request width. | |
static UInt_t | max_height = 800 |
Maximum request height. | |
class RGPrintRequester
This class defines a print request:
In the command line, the file name is indicated by 'f' tag.
For a request returning a printing command, if 'f' tag is found, it is replaced by the file name, else the file name is added at the end of the command.
The type of request depends on the constructor choice. The options are kept in static variables of the class, so that they are memorized.
RGPrintRequester::RGPrintRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
string & | command, | ||
int & | result, | ||
const char * | title, | ||
const char * | message = "" , |
||
const char * | buttons = rDico.prrq_print_buttons.c_str() , |
||
const ULong_t | opts = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor with print command return. The command line do not replace a file name.
When closing, the argument result get information on the button that closed the request, and command get the printing command without file name.
parent | parent window |
main | main application window |
command | returned command line |
result | return value (button) |
title | title |
message | associated text message |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), exec_print, file_name, pad_ptr, print_command, and RGBaseRequester::Request().
RGPrintRequester::RGPrintRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string & | fname, | ||
string & | command, | ||
int & | result, | ||
const char * | title, | ||
const char * | message = "" , |
||
const char * | buttons = rDico.prrq_print_buttons.c_str() , |
||
const ULong_t | opts = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor with print command return including file name.
When closing, the argument result get information on the button that closed the request, and command get the printing command without file name.
parent | parent window |
main | main application window |
fname | name of the file to print |
command | returned command line |
result | return value (button) |
title | title |
message | associated text message |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), exec_print, file_name, pad_ptr, print_command, and RGBaseRequester::Request().
RGPrintRequester::RGPrintRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string & | fname, | ||
const char * | title, | ||
const char * | message = "" , |
||
const char * | buttons = rDico.prrq_print_buttons.c_str() , |
||
const ULong_t | opts = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor of a request for immediate printing of a file. There is no returned value.
parent | parent window |
main | main application window |
fname | name of the file to print |
title | title |
message | associated text message |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), exec_print, file_name, RGBaseRequester::options, pad_ptr, print_command, and RGBaseRequester::Request().
RGPrintRequester::RGPrintRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
TPad * | pad, | ||
const char * | title, | ||
const char * | message = "" , |
||
const char * | buttons = rDico.prrq_print_buttons.c_str() , |
||
const ULong_t | opts = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor of a request for immediate printing of a pad. There is no returned value.
parent | parent window |
main | main application window |
pad | pointer of pad to print |
title | title |
message | associated text message |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), exec_print, file_name, pad_ptr, print_command, and RGBaseRequester::Request().
|
private |
Copy constructor, not implemented.
req | request to copy |
|
virtual |
Destructor.
|
private |
Macro from GCpp library that defines the following functions:
|
virtual |
Construction of the request: include class specific widgets.
Reimplemented from RGBaseRequester.
References RGBaseRequester::AddFrame(), default_command, default_orientation, default_size_x, default_size_y, RGBaseRequester::options, RGPadPrintCommand::SetPrintCommand(), RGPadPrintCommand::SetPrintOrientation(), RGPadPrintCommand::SetPrintSizeX(), RGPadPrintCommand::SetPrintSizeY(), and w_print_cmd.
Referenced by RGPrintRequester().
|
inlinestatic |
Get the print command, without checking for file name, from static class information.
References default_command.
|
inlinestatic |
Get paper size X (cm), from static data.
References default_size_x.
|
inlinestatic |
Get paper size Y (cm), from static data.
References default_size_y.
|
inlinestatic |
Get paper orientation, from static data.
References default_orientation.
|
static |
Get the print options to generate a file from a ROOT canvas, using static options.
References default_orientation.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Print a file from the command line from static data (paper size options are not considered here).
fname | file name |
References GetPrintCommand().
|
static |
Print a pad from the command line from static data.
pad | pad pointer |
References default_orientation, Print(), and TMP_PAD_PRINT_FILE.
|
virtual |
Slot used to get the button clicked, and adapt the actions to be done to the type of request.
References default_command, default_orientation, default_size_x, default_size_y, exec_print, file_name, RGPadPrintCommand::GetPrintCommand(), GetPrintCommand(), RGPadPrintCommand::GetPrintOrientation(), RGPadPrintCommand::GetPrintSizeX(), RGPadPrintCommand::GetPrintSizeY(), pad_ptr, Print(), print_command, RGBaseRequester::result_adr, and w_print_cmd.
RGPrintRequester::ClassDef | ( | RGPrintRequester | , |
0 | |||
) |
For ROOT dictionary.