component: old wxOSX/Carbon port | priority: normal
2003-06-12 23:35:21: ryanwilcox created the issue
wxFrame (and other objects that call
MacCreateRealWindow) were not respecting the following
styles:
- wxCLOSE_BOX
- wxMINIMIZE_BOX
- wxMAXIMIZE_BOX
This patch solves several problems:
PROBLEM 1:
Investigation showed that the existing logic wasn't allowing
these attributes/styles to be set separately. This patch
reworks that logic, making it possible to set attributes
separately.
PROBLEM 2:
The window class was being determined by a check for
minimize and maximize boxes, but not close boxes. This
patch checks for wxCLOSE_BOX as well, as it was found
that trying to set a kWindowCloseBoxAttribute as an
attribute of a kPlainWindowClass isn't allowed. (Reference:
MacWindows.h, Window Attributes section)
PROBLEM 3:
Added a wxCHECK_RET to make sure that noErr was
returned by ::(Mac)CreateNewWindow (if an error is
returned ,a null window ptr is created - and while that
would be caught further up in the framework, the added
CHECK_RET gives programmers a more exact idea as to
what their problem is).
Issue migrated from trac ticket # 5957
component: old wxOSX/Carbon port | priority: normal
2003-06-12 23:35:21: ryanwilcox created the issue
wxFrame (and other objects that call MacCreateRealWindow) were not respecting the following styles:
This patch solves several problems:
PROBLEM 1: Investigation showed that the existing logic wasn't allowing these attributes/styles to be set separately. This patch reworks that logic, making it possible to set attributes separately.
PROBLEM 2: The window class was being determined by a check for minimize and maximize boxes, but not close boxes. This patch checks for wxCLOSE_BOX as well, as it was found that trying to set a kWindowCloseBoxAttribute as an attribute of a kPlainWindowClass isn't allowed. (Reference: MacWindows.h, Window Attributes section)
PROBLEM 3:
Added a wxCHECK_RET to make sure that noErr was returned by ::(Mac)CreateNewWindow (if an error is returned ,a null window ptr is created - and while that would be caught further up in the framework, the added
CHECK_RET gives programmers a more exact idea as to what their problem is).