Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

SaX::SaXManipulateLayout Class Reference

SaX2 - Layout class. More...

#include <layout.h>

Inheritance diagram for SaX::SaXManipulateLayout:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setXOrgMultiheadMode (int)
bool setXOrgLayout (int, int, int, int, int)
int getMultiheadMode (void)
QList< QString > getXOrgLayout (int)
QList< QString > getInputLayout (void)
void addInputLayout (int)
void removeInputLayout (int)
 SaXManipulateLayout (SaXImport *, SaXImport *)

Detailed Description

SaX2 - Layout class.

The layout manipulator requires two import objects (Layout and Card) to become created. Once created the manipulator object is able to get/set layout related information. The layout specifies the relationship and cooperation between the screens. The following example demonstrate how to check for the multihead mode currently used:

 #include <sax/sax.h>

 int main (void) {
     SaXException().setDebug (true);
     QDict<SaXImport> section;
     int importID[] = {
         SAX_LAYOUT,
         SAX_CARD
     };
     printf ("Importing data...\n");
     SaXConfig* config = new SaXConfig;
     for (int id=0; id<2; id++) {
         SaXImport* import = new SaXImport ( importID[id] );
         import->setSource ( SAX_SYSTEM_CONFIG );
         import->doImport();
         config->addImport (import);
         section.insert (
             import->getSectionName(),import
         );
     }
     printf ("checking multihead mode... ");
     SaXManipulateLayout layout (
         section["Layout"],section["Card"]
     );
     switch (layout.getMultiheadMode()) {
         case SAX_SINGLE_HEAD:
             printf ("single head mode\n");
         break;
         case SAX_XINERAMA:
             printf ("Xorg Xinerama mode\n");
         break;
         case SAX_TRADITIONAL:
             printf ("Xorg traditional multihead\n");
         break;
         case SAX_CLONE:
             printf ("Xorg cloned multihead\n");
         break;
         case SAX_TWINVIEW:
             printf ("Nvidia Twinview mode\n");
         break;
         case SAX_TWINVIEW_CLONE:
             printf ("Nvidia Twinview clone mode\n");
         break;
         default:
             printf ("unknown mode\n");
         break;
     }
     return (0);
 }

Definition at line 130 of file layout.h.


Constructor & Destructor Documentation

SaX::SaXManipulateLayout::SaXManipulateLayout SaXImport layout,
SaXImport card
 

An object of this type is used to configure the server layout. This includes mainly the configuration of the multihead arrangement and the multihead mode

Definition at line 27 of file layout.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excCardImportBindFailed(), SaX::SaXException::excLayoutImportBindFailed(), SaX::SaXException::excNullPointerArgument(), and SaX::SaXImport::getSectionID().

Here is the call graph for this function:


Member Function Documentation

void SaX::SaXManipulateLayout::addInputLayout int  id  )  [virtual]
 

add the given pointer ID to the InputDevice option of the layout section.

Implements SaX::SaXManipulateLayoutIF.

Definition at line 251 of file layout.cpp.

QList< QString > SaX::SaXManipulateLayout::getInputLayout void   )  [virtual]
 

return the layout of the pointer devices. The list contains the Identifier numbers of the activated devices

Implements SaX::SaXManipulateLayoutIF.

Definition at line 220 of file layout.cpp.

References SaX::SaXException::errorString(), and SaX::SaXException::excGetInputLayoutFailed().

Here is the call graph for this function:

int SaX::SaXManipulateLayout::getMultiheadMode void   )  [virtual]
 

return an identifier for the currently used multihead mode. Currently there are the following modes: SAX_TWINVIEW,SAX_TRADITIONAL,SAX_SINGLE_HEAD,SAX_CLONE and SAX_XINERAMA. The return of SAX_UNKNOWN_MODE should never happen

Implements SaX::SaXManipulateLayoutIF.

Definition at line 126 of file layout.cpp.

References SaX::SaXStorage::getCount(), SaX::SaXManipulateCard::getOptions(), and SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateLayout::getXOrgLayout int  screen  )  [virtual]
 

return the layout for the given screen (screen). The returned list has four elements which defines the (left | right | top | bottom) neighbours of the requested screen

Implements SaX::SaXManipulateLayoutIF.

Definition at line 186 of file layout.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excGetScreenLayoutFailed(), and SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

void SaX::SaXManipulateLayout::removeInputLayout int  id  )  [virtual]
 

remove the given pointer ID from the InputDevice option of the layout section

Implements SaX::SaXManipulateLayoutIF.

Definition at line 269 of file layout.cpp.

bool SaX::SaXManipulateLayout::setXOrgLayout int  screen,
int  left,
int  right,
int  top,
int  bottom
[virtual]
 

set the layout for the given screen (screen). The parameters define the neighbour IDs at the positions left , right , top and bottom. If there is no neighbour at position X a negative value must be set

Implements SaX::SaXManipulateLayoutIF.

Definition at line 86 of file layout.cpp.

References SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

void SaX::SaXManipulateLayout::setXOrgMultiheadMode int  mode  )  [virtual]
 

set the multihead mode which can be one of the following settings: SAX_XINERAMA, SAX_TRADITIONAL or SAX_CLONE

Implements SaX::SaXManipulateLayoutIF.

Definition at line 57 of file layout.cpp.

References SaX::SaXException::errorString(), and SaX::SaXException::excInvalidArgument().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 10:27:37 2005 for libsax by  doxygen 1.4.4