LibreOffice Module vcl (master)  1
Public Types | Public Member Functions | Private Attributes | List of all members
ApplicationEvent Class Reference

An application can be notified of a number of different events: More...

#include <svapp.hxx>

Public Types

enum  Type {
  Type::Accept,
  Type::Appear,
  Type::Open,
  Type::OpenHelpUrl,
  Type::Print,
  Type::PrivateDoShutdown,
  Type::QuickStart,
  Type::ShowDialog,
  Type::Unaccept
}
 

Public Member Functions

 ApplicationEvent (Type type)
 Explicit constructor for ApplicationEvent. More...
 
 ApplicationEvent (Type type, OUString const &data)
 Constructor for ApplicationEvent, accepts a string for the data associated with the event. More...
 
 ApplicationEvent (Type type, std::vector< OUString > const &data)
 Constructor for ApplicationEvent, accepts an array of strings for the data associated with the event. More...
 
Type GetEvent () const
 Get the type of event. More...
 
OUString const & GetStringData () const
 Gets the application event's data string. More...
 
std::vector< OUString > const & GetStringsData () const
 Gets the event's array of strings. More...
 

Private Attributes

Type const aEvent
 
std::vector< OUString > aData
 

Detailed Description

An application can be notified of a number of different events:

Definition at line 121 of file svapp.hxx.

Member Enumeration Documentation

Enumerator
Accept 

Listen for connections.

Appear 

Make application appear.

Open 

Open a document.

OpenHelpUrl 

Open a help URL.

Print 

Print document.

PrivateDoShutdown 

Shutdown application.

QuickStart 

Start QuickStart.

ShowDialog 

Show a dialog.

Unaccept 

Stop listening for connections.

Definition at line 124 of file svapp.hxx.

Constructor & Destructor Documentation

ApplicationEvent::ApplicationEvent ( Type  type)
inlineexplicit

Explicit constructor for ApplicationEvent.

Attention:
Type::Appear, Type::PrivateDoShutdown and Type::QuickStart are the only events that don't need to include a data string with the event. No other events should use this constructor!

Definition at line 143 of file svapp.hxx.

ApplicationEvent::ApplicationEvent ( Type  type,
OUString const &  data 
)
inline

Constructor for ApplicationEvent, accepts a string for the data associated with the event.

Attention:
Type::Accept, Type::OpenHelpUrl, Type::ShowDialog and Type::Unaccept are the only events that accept a single string as event data. No other events should use this constructor!

Definition at line 155 of file svapp.hxx.

References aData.

ApplicationEvent::ApplicationEvent ( Type  type,
std::vector< OUString > const &  data 
)
inline

Constructor for ApplicationEvent, accepts an array of strings for the data associated with the event.

Attention:
Type::Open and Type::Print can apply to multiple documents, and are the only events that accept an array of strings. No other events should use this constructor.

Definition at line 170 of file svapp.hxx.

References aData.

Member Function Documentation

Type ApplicationEvent::GetEvent ( ) const
inline

Get the type of event.

Returns
The type of event.

Definition at line 180 of file svapp.hxx.

OUString const& ApplicationEvent::GetStringData ( ) const
inline

Gets the application event's data string.

Attention:
The only events that need a single string Type::Accept, Type::OpenHelpUrl, Type::ShowDialog and Type::Unaccept
Returns
The event's data string.

Definition at line 192 of file svapp.hxx.

References aData.

std::vector<OUString> const& ApplicationEvent::GetStringsData ( ) const
inline

Gets the event's array of strings.

Attention:
The only events that need an array of strings are Type::Open and Type::Print.

Definition at line 207 of file svapp.hxx.

References aData.

Member Data Documentation

std::vector<OUString> ApplicationEvent::aData
private

Definition at line 215 of file svapp.hxx.

Type const ApplicationEvent::aEvent
private

Definition at line 214 of file svapp.hxx.


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