add more properties

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-09-06 04:20:39 +00:00
parent f77c79d049
commit 42e2bbb9e1
15 changed files with 147 additions and 4 deletions

View File

@@ -70,6 +70,12 @@ public:
// void SetMenuItem(wxMenuItem *item); // void SetMenuItem(wxMenuItem *item);
// wxMenuItem *GetMenuItem() const; // wxMenuItem *GetMenuItem() const;
%newobject Create;
DocDeclStr(
static wxAcceleratorEntry *, Create(const wxString& str),
"Create accelerator corresponding to the specified string, or None if
it coulnd't be parsed.", "");
DocDeclStr( DocDeclStr(
int , GetFlags(), int , GetFlags(),
"Get the AcceleratorEntry's flags.", ""); "Get the AcceleratorEntry's flags.", "");

View File

@@ -373,6 +373,15 @@ style, use GetPath for the others.", "");
// const wxString &extensionList); // const wxString &extensionList);
%property(Directory, GetDirectory, SetDirectory, doc="See `GetDirectory` and `SetDirectory`");
%property(Filename, GetFilename, SetFilename, doc="See `GetFilename` and `SetFilename`");
%property(Filenames, GetFilenames, doc="See `GetFilenames`");
%property(FilterIndex, GetFilterIndex, SetFilterIndex, doc="See `GetFilterIndex` and `SetFilterIndex`");
%property(Message, GetMessage, SetMessage, doc="See `GetMessage` and `SetMessage`");
%property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
%property(Paths, GetPaths, doc="See `GetPaths`");
%property(Wildcard, GetWildcard, SetWildcard, doc="See `GetWildcard` and `SetWildcard`");
}; };
@@ -627,6 +636,14 @@ default is 0, 0 (unrestricted range).", "");
void , SetShowHelp(bool showHelp), void , SetShowHelp(bool showHelp),
"Determines whether the Help button will be displayed in the font "Determines whether the Help button will be displayed in the font
dialog (Windows only). The default value is false.", ""); dialog (Windows only). The default value is false.", "");
%property(AllowSymbols, GetAllowSymbols, SetAllowSymbols, doc="See `GetAllowSymbols` and `SetAllowSymbols`");
%property(ChosenFont, GetChosenFont, SetChosenFont, doc="See `GetChosenFont` and `SetChosenFont`");
%property(Colour, GetColour, SetColour, doc="See `GetColour` and `SetColour`");
%property(EnableEffects, GetEnableEffects, doc="See `GetEnableEffects`");
%property(InitialFont, GetInitialFont, SetInitialFont, doc="See `GetInitialFont` and `SetInitialFont`");
%property(ShowHelp, GetShowHelp, SetShowHelp, doc="See `GetShowHelp` and `SetShowHelp`");
}; };
@@ -656,6 +673,8 @@ results with via the `wx.FontData` returned by `GetFontData`.", "");
wxFontData& , GetFontData(), wxFontData& , GetFontData(),
"Returns a reference to the internal `wx.FontData` used by the "Returns a reference to the internal `wx.FontData` used by the
wx.FontDialog.", ""); wx.FontDialog.", "");
%property(FontData, GetFontData, doc="See `GetFontData`");
}; };
@@ -890,6 +909,11 @@ and replace all events).", "");
DocDeclStr( DocDeclStr(
void , SetReplaceString(const wxString& str), void , SetReplaceString(const wxString& str),
"", ""); "", "");
%property(Dialog, GetDialog, doc="See `GetDialog`");
%property(FindString, GetFindString, SetFindString, doc="See `GetFindString` and `SetFindString`");
%property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`");
%property(ReplaceString, GetReplaceString, SetReplaceString, doc="See `GetReplaceString` and `SetReplaceString`");
}; };
@@ -954,6 +978,9 @@ public:
void , SetReplaceString(const wxString& str), void , SetReplaceString(const wxString& str),
"Set the replacement string (used as initial value by the dialog).", ""); "Set the replacement string (used as initial value by the dialog).", "");
%property(FindString, GetFindString, SetFindString, doc="See `GetFindString` and `SetFindString`");
%property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`");
%property(ReplaceString, GetReplaceString, SetReplaceString, doc="See `GetReplaceString` and `SetReplaceString`");
}; };
@@ -1018,6 +1045,7 @@ non-None. Use Show to display the dialog.", "");
void , SetData(wxFindReplaceData *data), void , SetData(wxFindReplaceData *data),
"Set the FindReplaceData object used by this dialog.", ""); "Set the FindReplaceData object used by this dialog.", "");
%property(Data, GetData, SetData, doc="See `GetData` and `SetData`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -243,6 +243,8 @@ class FutureCall:
# if it wasn't restarted, then cleanup # if it wasn't restarted, then cleanup
wx.CallAfter(self.Stop) wx.CallAfter(self.Stop)
Interval = property(GetInterval)
Result = property(GetResult)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

View File

@@ -749,6 +749,7 @@ public:
void , AddFile(const wxString &filename), void , AddFile(const wxString &filename),
"Adds a file to the list of files represented by this data object.", ""); "Adds a file to the list of files represented by this data object.", "");
%property(Filenames, GetFilenames, doc="See `GetFilenames`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -50,6 +50,12 @@ public:
// Tile a bitmap // Tile a bitmap
bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap); bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap);
%property(DarkShadow, GetDarkShadow, SetDarkShadow, doc="See `GetDarkShadow` and `SetDarkShadow`");
%property(FaceColour, GetFaceColour, SetFaceColour, doc="See `GetFaceColour` and `SetFaceColour`");
%property(HighlightColour, GetHighlightColour, SetHighlightColour, doc="See `GetHighlightColour` and `SetHighlightColour`");
%property(LightShadow, GetLightShadow, SetLightShadow, doc="See `GetLightShadow` and `SetLightShadow`");
%property(MediumShadow, GetMediumShadow, SetMediumShadow, doc="See `GetMediumShadow` and `SetMediumShadow`");
}; };

View File

@@ -475,6 +475,13 @@ example, you can use the value returned by an earlier call to
// all derived classes must implement it because otherwise wxPostEvent() // all derived classes must implement it because otherwise wxPostEvent()
// for them wouldn't work (it needs to do a copy of the event) // for them wouldn't work (it needs to do a copy of the event)
virtual wxEvent *Clone() /* =0*/; virtual wxEvent *Clone() /* =0*/;
%property(EventObject, GetEventObject, SetEventObject, doc="See `GetEventObject` and `SetEventObject`");
%property(EventType, GetEventType, SetEventType, doc="See `GetEventType` and `SetEventType`");
%property(Id, GetId, SetId, doc="See `GetId` and `SetId`");
%property(Skipped, GetSkipped, doc="See `GetSkipped`");
%property(Timestamp, GetTimestamp, SetTimestamp, doc="See `GetTimestamp` and `SetTimestamp`");
}; };
@@ -1539,6 +1546,8 @@ public:
"Returns the device context the event handler should draw upon. If "Returns the device context the event handler should draw upon. If
``None`` is returned then create a temporary `wx.ClientDC` and use ``None`` is returned then create a temporary `wx.ClientDC` and use
that instead.", ""); that instead.", "");
%property(DC, GetDC, doc="See `GetDC`");
}; };
@@ -1571,6 +1580,8 @@ window which is going to receive focus for the wxEVT_KILL_FOCUS event.
Warning: the window returned may be None!", ""); Warning: the window returned may be None!", "");
void SetWindow(wxWindow *win); void SetWindow(wxWindow *win);
%property(Window, GetWindow, SetWindow, doc="See `GetWindow` and `SetWindow`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -128,6 +128,9 @@ public:
return event.Unbind(self, id, id2) return event.Unbind(self, id, id2)
} }
%property(EvtHandlerEnabled, GetEvtHandlerEnabled, SetEvtHandlerEnabled, doc="See `GetEvtHandlerEnabled` and `SetEvtHandlerEnabled`");
%property(NextHandler, GetNextHandler, SetNextHandler, doc="See `GetNextHandler` and `SetNextHandler`");
%property(PreviousHandler, GetPreviousHandler, SetPreviousHandler, doc="See `GetPreviousHandler` and `SetPreviousHandler`");
}; };

View File

@@ -42,6 +42,13 @@ public:
const wxString& GetLocation(); const wxString& GetLocation();
const wxString& GetAnchor(); const wxString& GetAnchor();
wxDateTime GetModificationTime(); wxDateTime GetModificationTime();
%property(Anchor, GetAnchor, doc="See `GetAnchor`");
%property(Location, GetLocation, doc="See `GetLocation`");
%property(MimeType, GetMimeType, doc="See `GetMimeType`");
%property(ModificationTime, GetModificationTime, doc="See `GetModificationTime`");
%property(Stream, GetStream, doc="See `GetStream`");
}; };
@@ -121,6 +128,12 @@ public:
wxString GetAnchor(const wxString& location); wxString GetAnchor(const wxString& location);
wxString GetRightLocation(const wxString& location); wxString GetRightLocation(const wxString& location);
wxString GetMimeTypeFromExt(const wxString& location); wxString GetMimeTypeFromExt(const wxString& location);
%property(Anchor, GetAnchor, doc="See `GetAnchor`");
%property(LeftLocation, GetLeftLocation, doc="See `GetLeftLocation`");
%property(MimeTypeFromExt, GetMimeTypeFromExt, doc="See `GetMimeTypeFromExt`");
%property(Protocol, GetProtocol, doc="See `GetProtocol`");
%property(RightLocation, GetRightLocation, doc="See `GetRightLocation`");
}; };
@@ -158,6 +171,8 @@ public:
return fname.GetFullPath(); return fname.GetFullPath();
} }
} }
%property(Path, GetPath, doc="See `GetPath`");
}; };

View File

@@ -429,6 +429,8 @@ public:
// the title for the dialogs (note that default is quite reasonable) // the title for the dialogs (note that default is quite reasonable)
void SetDialogTitle(const wxString& title); void SetDialogTitle(const wxString& title);
%property(AltForEncoding, GetAltForEncoding, doc="See `GetAltForEncoding`");
}; };
@@ -804,6 +806,22 @@ then for a font belonging to the same family.", "");
static void , SetDefaultEncoding(wxFontEncoding encoding), static void , SetDefaultEncoding(wxFontEncoding encoding),
"Sets the default font encoding.", ""); "Sets the default font encoding.", "");
%property(Encoding, GetEncoding, SetEncoding, doc="See `GetEncoding` and `SetEncoding`");
%property(FaceName, GetFaceName, SetFaceName, doc="See `GetFaceName` and `SetFaceName`");
%property(Family, GetFamily, SetFamily, doc="See `GetFamily` and `SetFamily`");
%property(FamilyString, GetFamilyString, doc="See `GetFamilyString`");
%property(NativeFontInfo, GetNativeFontInfo, SetNativeFontInfo, doc="See `GetNativeFontInfo` and `SetNativeFontInfo`");
%property(NativeFontInfoDesc, GetNativeFontInfoDesc, doc="See `GetNativeFontInfoDesc`");
%property(NativeFontInfoUserDesc, GetNativeFontInfoUserDesc, SetNativeFontInfoUserDesc, doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`");
%property(NoAntiAliasing, GetNoAntiAliasing, SetNoAntiAliasing, doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`");
%property(PixelSize, GetPixelSize, SetPixelSize, doc="See `GetPixelSize` and `SetPixelSize`");
%property(PointSize, GetPointSize, SetPointSize, doc="See `GetPointSize` and `SetPointSize`");
%property(Style, GetStyle, SetStyle, doc="See `GetStyle` and `SetStyle`");
%property(StyleString, GetStyleString, doc="See `GetStyleString`");
%property(Underlined, GetUnderlined, SetUnderlined, doc="See `GetUnderlined` and `SetUnderlined`");
%property(Weight, GetWeight, SetWeight, doc="See `GetWeight` and `SetWeight`");
%property(WeightString, GetWeightString, doc="See `GetWeightString`");
}; };
%pythoncode { Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") } %pythoncode { Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") }

View File

@@ -52,6 +52,18 @@ wxString wxGetStockLabel(wxWindowID id,
long flags = wxSTOCK_WITH_MNEMONIC); long flags = wxSTOCK_WITH_MNEMONIC);
enum wxStockHelpStringClient
{
wxSTOCK_MENU // help string to use for menu items
};
// Returns an help string for the given stock UI element and for the given "context".
wxString wxGetStockHelpString(wxWindowID id,
wxStockHelpStringClient client = wxSTOCK_MENU);
MustHaveApp(wxBell); MustHaveApp(wxBell);
void wxBell(); void wxBell();

View File

@@ -86,6 +86,16 @@ public:
// get the icon info // get the icon info
const wxString& GetIconFile() const; const wxString& GetIconFile() const;
int GetIconIndex() const; int GetIconIndex() const;
%property(Description, GetDescription, doc="See `GetDescription`");
%property(Extensions, GetExtensions, doc="See `GetExtensions`");
%property(ExtensionsCount, GetExtensionsCount, doc="See `GetExtensionsCount`");
%property(IconFile, GetIconFile, doc="See `GetIconFile`");
%property(IconIndex, GetIconIndex, doc="See `GetIconIndex`");
%property(MimeType, GetMimeType, doc="See `GetMimeType`");
%property(OpenCommand, GetOpenCommand, doc="See `GetOpenCommand`");
%property(PrintCommand, GetPrintCommand, doc="See `GetPrintCommand`");
%property(ShortDesc, GetShortDesc, SetShortDesc, doc="See `GetShortDesc` and `SetShortDesc`");
}; };
@@ -289,6 +299,15 @@ public:
} }
} }
%property(AllCommands, GetAllCommands, doc="See `GetAllCommands`");
%property(Description, GetDescription, doc="See `GetDescription`");
%property(Extensions, GetExtensions, doc="See `GetExtensions`");
%property(Icon, GetIcon, doc="See `GetIcon`");
%property(IconInfo, GetIconInfo, doc="See `GetIconInfo`");
%property(MimeType, GetMimeType, doc="See `GetMimeType`");
%property(MimeTypes, GetMimeTypes, doc="See `GetMimeTypes`");
%property(OpenCommand, GetOpenCommand, doc="See `GetOpenCommand`");
%property(PrintCommand, GetPrintCommand, doc="See `GetPrintCommand`");
}; };

View File

@@ -182,6 +182,10 @@ public:
int GetCount() const; int GetCount() const;
%pythoncode { GetNoHistoryFiles = GetCount } %pythoncode { GetNoHistoryFiles = GetCount }
%property(Count, GetCount, doc="See `GetCount`");
%property(HistoryFile, GetHistoryFile, doc="See `GetHistoryFile`");
%property(MaxFiles, GetMaxFiles, doc="See `GetMaxFiles`");
%property(NoHistoryFiles, GetNoHistoryFiles, doc="See `GetNoHistoryFiles`");
}; };

View File

@@ -292,6 +292,8 @@ public:
// Returns the filtered value currently placed in the text control (if present). // Returns the filtered value currently placed in the text control (if present).
wxString GetTextCtrlValue() const; wxString GetTextCtrlValue() const;
%property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
%property(TextCtrlValue, GetTextCtrlValue, doc="See `GetTextCtrlValue`");
}; };
@@ -356,6 +358,8 @@ public:
wxString GetPath() const { return m_path; } wxString GetPath() const { return m_path; }
void SetPath(const wxString &p) { m_path = p; } void SetPath(const wxString &p) { m_path = p; }
%property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`");
}; };
@@ -413,6 +417,9 @@ public:
// set/get the max pointsize // set/get the max pointsize
void SetMaxPointSize(unsigned int max); void SetMaxPointSize(unsigned int max);
unsigned int GetMaxPointSize() const; unsigned int GetMaxPointSize() const;
%property(MaxPointSize, GetMaxPointSize, SetMaxPointSize, doc="See `GetMaxPointSize` and `SetMaxPointSize`");
%property(SelectedFont, GetSelectedFont, SetSelectedFont, doc="See `GetSelectedFont` and `SetSelectedFont`");
}; };
@@ -430,6 +437,8 @@ public:
wxFont GetFont() const; wxFont GetFont() const;
void SetFont(const wxFont &c); void SetFont(const wxFont &c);
%property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -1365,9 +1365,7 @@ previously). Argument *mode* can be one of the following values:
growable or not in the flexbile direction. growable or not in the flexbile direction.
========================== ================================================= ========================== =================================================
Note that this method does not trigger relayout. Note that this method does not trigger relayout.", "");
", "");
DocDeclStr( DocDeclStr(
wxFlexSizerGrowMode , GetNonFlexibleGrowMode(), wxFlexSizerGrowMode , GetNonFlexibleGrowMode(),
@@ -1390,6 +1388,12 @@ rows in the sizer.", "");
"Returns a list of integers representing the widths of each of the "Returns a list of integers representing the widths of each of the
columns in the sizer.", ""); columns in the sizer.", "");
%property(ColWidths, GetColWidths, doc="See `GetColWidths`");
%property(FlexibleDirection, GetFlexibleDirection, SetFlexibleDirection, doc="See `GetFlexibleDirection` and `SetFlexibleDirection`");
%property(NonFlexibleGrowMode, GetNonFlexibleGrowMode, SetNonFlexibleGrowMode, doc="See `GetNonFlexibleGrowMode` and `SetNonFlexibleGrowMode`");
%property(RowHeights, GetRowHeights, doc="See `GetRowHeights`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -318,6 +318,11 @@ public:
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
%property(MenuBar, GetMenuBar, SetMenuBar, doc="See `GetMenuBar` and `SetMenuBar`");
%property(StatusBar, GetStatusBar, SetStatusBar, doc="See `GetStatusBar` and `SetStatusBar`");
%property(StatusBarPane, GetStatusBarPane, SetStatusBarPane, doc="See `GetStatusBarPane` and `SetStatusBarPane`");
%property(ToolBar, GetToolBar, SetToolBar, doc="See `GetToolBar` and `SetToolBar`");
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------