The IBidiSettings class identifies information about the bidirectional national language support for a window or graphic context. You can create objects of this class to query and set the bidirectional attributes of a window or a graphic context. An IBidiSettings object identifies the bidirectional attributes of a window or graphic context at one point in time, and is not updated if the bidirectional attributes of the window or graphic context change. Changes you make to an IBidiSettings object are not reflected in the window until you call IBidiSettings::apply.
IBidiSettings does not support querying and setting the bidirectional attributes of a graphics port or graphic context. Additionally, you cannot change the bidirectional attributes of a window after it has been created.
IBidiSettings does not support querying and setting the bidirectional attributes of a graphics port or graphic context. Additionally, you can only control the settings of two bidirectional attributes of a window: the window layout and its text orientation.
You can construct, copy, assign, and delete objects of the IBidiSettings class. However, you can construct an IBidiSettings object only if the function IBidiSettings::isBidiSupported returns true.
![]() |
public:
virtual ~IBidiSettings()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IBidiSettings(const IGrafPort& port)
Use this constructor to query the bidirectional attributes of the graphics port.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
public:
IBidiSettings(const IWindow& window)
Use this constructor to query the bidirectional attributes of the specified window.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IBidiSettings(const IBidiSettings& settings)
Use this copy constructor to create an IBidiSettings object with the same values as the specified one.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IBidiSettings(const IWindowHandle& windowHandle)
Use this constructor to query the bidirectional attributes of the specified window.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IBidiSettings(const IPresSpaceHandle& presSpace)
Use this constructor to query the bidirectional attributes of the specified presentation space.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
protected:
IBidiSettings()
The IBidiSettings class uses this default constructor to implement the applicationDefaults and setApplicationDefaults functions.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IBidiSettings& operator =(const IBidiSettings& settings)
Use this assignment operator to initialize an IBidiSettings object using the values of the specified object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These functions allow you to set and query the default bidirectional characteristics for the application. Open Class Library (or the operating system) uses these defaults to set the bidirectional attributes of a window when it creates it.
When Open Class Library (or the operating system) creates a window with either no parent window or the desktop window as its parent, it will apply the bidirectional attributes you set with this call to that window. For example, if you use the IFrameWindow class to create a primary or secondary frame window, that frame window will inherit the application bidirectional attributes.
A window with a parent other than the desktop window inherits the bidirectional attributes of its parent window.
Wrappering an existing window with an IWindow or IWindow-derived object will not cause Open Class Library to change the bidirectional attributes of the window.
After creating a window, you can change its bidirectional attributes using IBidiSettings::apply.
To give bidirectional attributes to a dialog that you load from a resource file, specify the BIDIPARAM keyword in the dialog template.
The bidirectional attributes for the application do not affect dialogs that you load from a resource file. To create a dialog with a right-to-left layout, specify the extended styles WS_EX_RIGHT and WS_EX_RTLREADING in the dialog template.
![]() |
public:
static IBidiSettings applicationDefaults()
Use this function to query the bidirectional attributes for the application.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The object returned by this function does not reflect the setting of any Motif bidirectional resources, such as XmNSymmetricSwap.
The object returned by this function reflects the setting of the OS/2 BIDIATTR environment variable and any prior calls to WinSetLangInfo that have set process-level attributes.
The default layout direction is left-to-right.
![]() |
public:
static void setApplicationDefaults( const IBidiSettings& applicationSettings )
Use this function to set the bidirectional attributes for the application.
The easiest way to pass an object to this function is to call IBidiSettings::applicationDefaults, and then modify the returned object by calling functions like IBidiSettings::setWindowLayout and setTextOrientation.
IInvalidRequest | IBidiSettings::isBidiSupported indicates that your application is not running in an environment that supports bidirectional languages. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
By setting specific bidirectional attributes for the application, you override the setting of the corresponding Motif bidirectional resources, such as XmNtextMode or XmNnssMode.
You can maintain the use of Motif bidirectional resources by calling IBidiSettings::applicationDefaults to create an IBidiSettings object, then calling functions on the object to change only the attributes you want to control, before calling setApplicationDefaults. The attributes you do not change will continue to be determined through resources. For example, by calling IBidiSettings::setTextType, the XmNtextMode will not be used to define the bidirectional attributes of your windows.
Calling this function overrides the OS/2 BIDIATTR environment variable and any prior calls to WinSetLangInfo that have set process-level attributes.
Use these members to query and set bidirectional attributes.
![]() |
public:
virtual IBidiSettings& disableSymmetricSwapping()
Disables the swapping of directional characters.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& disableWordByWordReordering()
Disables word-by-word reordering.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& enableSymmetricSwapping( bool enable = true )
Enables the swapping of directional characters.
Directional characters are characters, such as parentheses, brackets, and braces. In left-to-right text, an "open" bracket is a left bracket, while for right-to-left text an "open" bracket is a right bracket.
When symmetric swapping is enabled, the system automatically swaps between the symmetrical characters if right-to-left text orientation is used.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& enableWordByWordReordering( bool enable = true )
Enables word-by-word reordering.
When word-by-word reordering is enabled, each word is evaluated for text reordering. Text reordering includes the reversal of text for display and the swapping of directional characters when using right-to-left text orientation.
When word-by-word reordering is disabled, only the first word is evaluated for text reordering, and the entire text uses the result.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isSymmetricSwappingEnabled() const
If symmetric swapping is enabled, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isWordByWordReorderingEnabled() const
If word-by-word reordering is enabled, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
BidiNumeralType numeralDisplay() const
Returns the bidirectional attribute that specifies how numerals (digits) are processed for display.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IBidiSettings& setNumeralDisplay( BidiNumeralType numeralDisplay )
Sets the bidirectional attribute that specifies how numerals (digits) are processed for display.
IInvalidParameter | You specified an uninitialized IBidiSettings::BidiNumeralType value. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& setTextOrientation( BidiTextOrientation textOrientation )
Sets the bidirectional attribute that specifies how bidirectional text is oriented for display.
IInvalidParameter | You specified an uninitialized IBidiSettings::BidiTextOrientation value. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Setting the text orientation to right-to-left effectively sets the window layout to right-to-left as well, because both attributes are represented by the same Motif resource. See IBidiSettings::asArgList for details.
![]() |
public:
virtual IBidiSettings& setTextShape( BidiTextShape textShape )
Sets the bidirectional attribute that specifies how Arabic text is processed for display and how new text typed by the user is stored.
IInvalidParameter | You specified an uninitialized IBidiSettings::BidiTextShape value. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& setTextType(BidiTextType textType)
Sets the bidirectional attribute that specifies how bidirectional text is detected and processed.
IInvalidParameter | You specified an uninitialized IBidiSettings::BidiTextType value. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IBidiSettings& setWindowLayout( BidiLayout windowLayout )
Sets the bidirectional attribute that specifies how objects in a window or dialog are positioned and justified.
IInvalidParameter | You specified an uninitialized IBidiSettings::BidiLayout value. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Setting the window layout to right-to-left effectively sets the text orientatation to right-to-left as well, because both attributes are represented by the same Motif resource. See IBidiSettings::asArgList for details.
![]() |
public:
BidiTextOrientation textOrientation() const
Returns the bidirectional attribute that specifies how bidirectional text is oriented for display.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
BidiTextShape textShape() const
Returns the bidirectional attribute that specifies how Arabic text is processed for display and how new text typed by the user is stored.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
BidiTextType textType() const
Returns the bidirectional attribute that specifies how bidirectional text is detected and processed for display.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
BidiLayout windowLayout() const
Returns the bidirectional attribute that specifies how objects in the window or dialog are positioned and justified.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query bidirectional support and set bidirectional attributes for a window or graphic context.
Reading and writing of Arabic or Hebrew text is done from right to left. Thus, the starting point of an Arabic or Hebrew text is on the right side of the page or screen while the ending of the text is on the left. Arabic and Hebrew text can also contain embedded text that is written and read from left to right (such as numbers or embedded Latin text). Having left-to-right text embedded in right-to-left text is the reason we refer to Arabic and Hebrew languages as bidirectional languages.
Applications that are developed for Arabic and Hebrew languages must accommodate bidirectional data. Bidirectional attributes query and set information about how text is stored and displayed on Arabic or Hebrew systems.
![]() |
Changes the bidirectional attributes.
public:
virtual void apply(const IPresSpaceHandle& presSpace) const
Assigns the bidirectional attributes defined in the IBidiSettings object to the specified presentation space.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
public:
virtual void apply(IGrafPort& port) const
Assigns the bidirectional attributes defined in the IBidiSettings object to the specified graphics port.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
public:
virtual void apply( IWindow& window, bool childInherit = true, bool refresh = true ) const
Assigns the bidirectional attributes defined in the IBidiSettings object to the specified window. If childInherit is set to true, the bidirectional attributes of all child windows are also changed. If refresh is set to true, the window is invalidated. The window can then repaint itself to reflect its new bidirectional attributes.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
Some windows may choose to ignore changes you make to their bidirectional attributes.
You cannot change the bidirectional attributes of a window after creating it.
This function calls IWindow::setBidiSettings.
If a child window does not have an IWindow object, this function will not propagate the changes to the child windows of the child window.
This function calls IWindow::setBidiSettings.
public:
virtual void apply( const IWindowHandle& windowHandle, bool childInherit = true, bool refresh = true ) const
Assigns the bidirectional attributes defined in the IBidiSettings object to the specified window. If childInherit is set to true, the bidirectional attributes of all child windows are also changed. If refresh is set to true, the window is invalidated. The window can then repaint itself to reflect its new bidirectional attributes.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
Some windows may choose to ignore changes you make to their bidirectional attributes.
You cannot change the bidirectional attributes of a window after creating it.
If the window has an IWindow object, this function calls IWindow::setBidiSettings.
If you are changing the bidirectional attributes of a window that has no IWindow object, childInherit is ignored and no child windows are changed. Otherwise, if childInherit is true, this function propagates the new bidirectional attributes to all of the window's child windows. However, if a child window does not have an IWindow object, this function will not propagate the changes to the child windows of the child window.
If the window has an IWindow object, this function calls IWindow::setBidiSettings.
![]() |
public:
static bool isBidiSupported()
If the operating system supports querying and setting of bidirectional attributes, true is returned. Otherwise, false is returned.
You cannot construct an IBidiSettings object if this function returns false.
IAccessError | An error occurred while querying system environment information. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These functions indicate if one object is equivalent to another.
![]() |
public:
bool operator ==(const IBidiSettings& settings) const
This operator returns true if two IBidiSettings objects are equivalent. Otherwise it returns false.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These functions allow you to convert an IBidiSettings object into an a different type.
![]() |
public:
IArgList asArgList() const
Returns the bidi attributes as a list of Motif resource names and values.
Windows | OS/2 | AIX |
No | No | Yes |
Both window layout and text orientation map to the XmStringDirection Motif resource. This function sets this resource to XmSTRING_DIRECTION_R_TO_L if either window layout or text orientation is right-to-left.
IWindow::create calls this function to build the argument list it uses to create a widget.
![]() |
enum BidiLayout { layoutLeftToRight, layoutRightToLeft }
Use these enumerations to specify how objects within a window or dialog are positioned (layed out) and how objects are justified:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum BidiNumeralType { arabic, asStored, national, contextual }
Use these enumerations to specify how numerals (digits) are processed for display:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum BidiTextOrientation { textLeftToRight, textRightToLeft, textContextual }
Use these enumerations to specify how bidirectional text is oriented for display:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum BidiTextShape { displayShaped, saveShaped, nominalShape, initialShape, middleShape, finalShape, isolatedShape }
Use these enumerations to specify how Arabic text is processed for display and how new text typed by the user is stored.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum BidiTextType { visual, implicit }
Use these enumerations to specify how bidirectional text is detected and processed:
Windows | OS/2 | AIX |
Yes | Yes | Yes |