-// The Appearance Manager docs show using tab controls in either edge to edge
-// mode, or inset. I think edge to edge conforms better to the other ports,
-// and inset mode is better accomplished with space around the wxNotebook rather
-// than within it. --Robin
-#define wxMAC_EDGE_TO_EDGE 1
-
-static inline int wxMacTabMargin(long nbStyle, long side)
-{
- static int tabMargin = -1;
- static int otherMargin = -1;
-
- if ( tabMargin == -1)
- {
- if ( UMAHasAquaLayout() )
- {
- tabMargin = 26; // From Appearance Manager docs for small tab control dimensions
-#if wxMAC_EDGE_TO_EDGE
- otherMargin = 0;
-#else
- otherMargin = 20;
-#endif
- }
- else
- {
- tabMargin = 30;
-#if wxMAC_EDGE_TO_EDGE
- otherMargin = 0;
-#else
- otherMargin = 16;
-#endif
- }
- }
-
- // If the style matches the side asked for then return the tab margin,
- // but we have to special case wxNB_TOP since it is zero...
- if ( side == wxNB_TOP)
- {
- if ( nbStyle != 0 && nbStyle & (wxNB_LEFT|wxNB_RIGHT|wxNB_BOTTOM))
- {
- return otherMargin;
- }
- else
- {
- return tabMargin;
- }
- }
- else if ( nbStyle & side)
- return tabMargin;
- else
- return otherMargin;
-}
-
-static inline int wxMacTabLeftMargin(long style)
-{
- return wxMacTabMargin(style, wxNB_LEFT);
-}
-
-static inline int wxMacTabTopMargin(long style)
-{
- return wxMacTabMargin(style, wxNB_TOP);
-}
-
-static inline int wxMacTabRightMargin(long style)
-{
- return wxMacTabMargin(style, wxNB_RIGHT);
-}
-
-static inline int wxMacTabBottomMargin(long style)
-{
- return wxMacTabMargin(style, wxNB_BOTTOM);
-}
-