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 class  Type {
  Accept ,
  Appear ,
  Open ,
  OpenHelpUrl ,
  Print ,
  PrivateDoShutdown ,
  QuickStart ,
  ShowDialog ,
  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 > &&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 aEvent
 
std::vector< OUString > aData
 

Detailed Description

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

Definition at line 114 of file svapp.hxx.

Member Enumeration Documentation

◆ Type

enum class ApplicationEvent::Type
strong
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 117 of file svapp.hxx.

Constructor & Destructor Documentation

◆ ApplicationEvent() [1/3]

ApplicationEvent::ApplicationEvent ( Type  type)
inlineexplicit

Explicit constructor for ApplicationEvent.

Attention: \n 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 136 of file svapp.hxx.

References aEvent, and type.

◆ ApplicationEvent() [2/3]

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

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

Attention: \n 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 148 of file svapp.hxx.

References aData, aEvent, and type.

◆ ApplicationEvent() [3/3]

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

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

Attention: \n 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 163 of file svapp.hxx.

References aData, aEvent, and type.

Member Function Documentation

◆ GetEvent()

Type ApplicationEvent::GetEvent ( ) const
inline

Get the type of event.

Returns
The type of event.

Definition at line 173 of file svapp.hxx.

References aEvent.

◆ GetStringData()

OUString const & ApplicationEvent::GetStringData ( ) const
inline

Gets the application event's data string.

Attention: \n 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 185 of file svapp.hxx.

References aData, and aEvent.

◆ GetStringsData()

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

Gets the event's array of strings.

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

Definition at line 200 of file svapp.hxx.

References aData, and aEvent.

Member Data Documentation

◆ aData

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

Definition at line 208 of file svapp.hxx.

◆ aEvent

Type ApplicationEvent::aEvent
private

Definition at line 207 of file svapp.hxx.


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