+
+ // 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);
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook construction
+// ----------------------------------------------------------------------------
+
+// common part of all ctors
+void wxNotebook::Init()
+{