Source cleaning: whitespaces, tabs, -1/wxNOT_FOUND, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
|||||||
virtual void SetFrameParameters(const wxString& title,
|
virtual void SetFrameParameters(const wxString& title,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
bool newFrameEachTime = FALSE)
|
bool newFrameEachTime = false)
|
||||||
{
|
{
|
||||||
m_helpController->SetFrameParameters( title, size, pos,
|
m_helpController->SetFrameParameters( title, size, pos,
|
||||||
newFrameEachTime );
|
newFrameEachTime );
|
||||||
|
@@ -62,7 +62,7 @@ public:
|
|||||||
// Specify the width and height of the images in the list,
|
// Specify the width and height of the images in the list,
|
||||||
// whether there are masks associated with them (e.g. if creating images
|
// whether there are masks associated with them (e.g. if creating images
|
||||||
// from icons), and the initial size of the list.
|
// from icons), and the initial size of the list.
|
||||||
wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1)
|
wxImageList(int width, int height, bool mask = true, int initialCount = 1)
|
||||||
{
|
{
|
||||||
Create(width, height, mask, initialCount);
|
Create(width, height, mask, initialCount);
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public:
|
|||||||
// width, height specify the size of the images in the list (all the same).
|
// width, height specify the size of the images in the list (all the same).
|
||||||
// mask specifies whether the images have masks or not.
|
// mask specifies whether the images have masks or not.
|
||||||
// initialNumber is the initial number of images to reserve.
|
// initialNumber is the initial number of images to reserve.
|
||||||
bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1);
|
bool Create(int width, int height, bool mask = true, int initialNumber = 1);
|
||||||
|
|
||||||
// Adds a bitmap, and optionally a mask bitmap.
|
// Adds a bitmap, and optionally a mask bitmap.
|
||||||
// Note that wxImageList creates *new* bitmaps, so you may delete
|
// Note that wxImageList creates *new* bitmaps, so you may delete
|
||||||
@@ -123,12 +123,12 @@ public:
|
|||||||
bool RemoveAll();
|
bool RemoveAll();
|
||||||
|
|
||||||
// Draws the given image on a dc at the specified position.
|
// Draws the given image on a dc at the specified position.
|
||||||
// If 'solidBackground' is TRUE, Draw sets the image list background
|
// If 'solidBackground' is true, Draw sets the image list background
|
||||||
// colour to the background colour of the wxDC, to speed up
|
// colour to the background colour of the wxDC, to speed up
|
||||||
// drawing by eliminating masked drawing where possible.
|
// drawing by eliminating masked drawing where possible.
|
||||||
bool Draw(int index, wxDC& dc, int x, int y,
|
bool Draw(int index, wxDC& dc, int x, int y,
|
||||||
int flags = wxIMAGELIST_DRAW_NORMAL,
|
int flags = wxIMAGELIST_DRAW_NORMAL,
|
||||||
bool solidBackground = FALSE);
|
bool solidBackground = false);
|
||||||
|
|
||||||
// TODO: miscellaneous functionality
|
// TODO: miscellaneous functionality
|
||||||
/*
|
/*
|
||||||
@@ -191,10 +191,10 @@ public:
|
|||||||
|
|
||||||
1) Starting to drag:
|
1) Starting to drag:
|
||||||
|
|
||||||
wxImageList *dragImageList = new wxImageList(16, 16, TRUE);
|
wxImageList *dragImageList = new wxImageList(16, 16, true);
|
||||||
dragImageList->Add(myDragImage); // Provide an image to combine with the current cursor
|
dragImageList->Add(myDragImage); // Provide an image to combine with the current cursor
|
||||||
dragImageList->BeginDrag(0, wxPoint(0, 0));
|
dragImageList->BeginDrag(0, wxPoint(0, 0));
|
||||||
wxShowCursor(FALSE); // wxShowCursor not yet implemented in wxWin
|
wxShowCursor(false); // wxShowCursor not yet implemented in wxWin
|
||||||
myWindow->CaptureMouse();
|
myWindow->CaptureMouse();
|
||||||
|
|
||||||
2) Dragging:
|
2) Dragging:
|
||||||
@@ -210,7 +210,7 @@ public:
|
|||||||
|
|
||||||
dragImageList->EndDrag();
|
dragImageList->EndDrag();
|
||||||
myWindow->ReleaseMouse();
|
myWindow->ReleaseMouse();
|
||||||
wxShowCursor(TRUE);
|
wxShowCursor(true);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,21 +56,21 @@ public:
|
|||||||
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
|
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
|
||||||
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
|
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
|
||||||
|
|
||||||
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfEntries(bool bRecursive = false) const;
|
||||||
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfGroups(bool bRecursive = false) const;
|
||||||
|
|
||||||
virtual bool HasGroup(const wxString& strName) const;
|
virtual bool HasGroup(const wxString& strName) const;
|
||||||
virtual bool HasEntry(const wxString& strName) const;
|
virtual bool HasEntry(const wxString& strName) const;
|
||||||
|
|
||||||
// return TRUE if the current group is empty
|
// return true if the current group is empty
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
|
|
||||||
virtual bool Flush(bool bCurrentOnly = FALSE);
|
virtual bool Flush(bool bCurrentOnly = false);
|
||||||
|
|
||||||
virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
|
virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
|
||||||
virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
|
virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
|
||||||
|
|
||||||
virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso = TRUE);
|
virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso = true);
|
||||||
virtual bool DeleteGroup(const wxString& szKey);
|
virtual bool DeleteGroup(const wxString& szKey);
|
||||||
virtual bool DeleteAll();
|
virtual bool DeleteAll();
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ bool wxBestHelpController::Initialize( const wxString& filename )
|
|||||||
if( chm->Initialize( GetValidFilename( filename ) ) )
|
if( chm->Initialize( GetValidFilename( filename ) ) )
|
||||||
{
|
{
|
||||||
m_helpController = chm;
|
m_helpController = chm;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// failed
|
// failed
|
||||||
@@ -61,13 +61,13 @@ bool wxBestHelpController::Initialize( const wxString& filename )
|
|||||||
if( html->Initialize( GetValidFilename( filename ) ) )
|
if( html->Initialize( GetValidFilename( filename ) ) )
|
||||||
{
|
{
|
||||||
m_helpController = html;
|
m_helpController = html;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// failed
|
// failed
|
||||||
delete html;
|
delete html;
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxBestHelpController::GetValidFilename( const wxString& filename ) const
|
wxString wxBestHelpController::GetValidFilename( const wxString& filename ) const
|
||||||
|
@@ -58,7 +58,7 @@ static bool LoadHtmlHelpLibrary()
|
|||||||
if( !lib )
|
if( !lib )
|
||||||
{
|
{
|
||||||
wxLogError(_("MS HTML Help functions are unavailable because the MS HTML Help library is not installed on this machine. Please install it."));
|
wxLogError(_("MS HTML Help functions are unavailable because the MS HTML Help library is not installed on this machine. Please install it."));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -69,11 +69,11 @@ static bool LoadHtmlHelpLibrary()
|
|||||||
wxLogError(_("Failed to initialize MS HTML Help."));
|
wxLogError(_("Failed to initialize MS HTML Help."));
|
||||||
|
|
||||||
lib->UnrefLib();
|
lib->UnrefLib();
|
||||||
return FALSE ;
|
return false ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UnloadHtmlHelpLibrary()
|
static void UnloadHtmlHelpLibrary()
|
||||||
@@ -99,60 +99,60 @@ bool wxCHMHelpController::Initialize(const wxString& filename)
|
|||||||
{
|
{
|
||||||
// warn on failure
|
// warn on failure
|
||||||
if( !LoadHtmlHelpLibrary() )
|
if( !LoadHtmlHelpLibrary() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_helpFile = filename;
|
m_helpFile = filename;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::LoadFile(const wxString& file)
|
bool wxCHMHelpController::LoadFile(const wxString& file)
|
||||||
{
|
{
|
||||||
if (!file.IsEmpty())
|
if (!file.IsEmpty())
|
||||||
m_helpFile = file;
|
m_helpFile = file;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::DisplayContents()
|
bool wxCHMHelpController::DisplayContents()
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, 0L);
|
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, 0L);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use topic or HTML filename
|
// Use topic or HTML filename
|
||||||
bool wxCHMHelpController::DisplaySection(const wxString& section)
|
bool wxCHMHelpController::DisplaySection(const wxString& section)
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
// Is this an HTML file or a keyword?
|
// Is this an HTML file or a keyword?
|
||||||
bool isFilename = (section.Find(wxT(".htm")) != -1);
|
bool isFilename = (section.Find(wxT(".htm")) != wxNOT_FOUND);
|
||||||
|
|
||||||
if (isFilename)
|
if (isFilename)
|
||||||
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, (DWORD) (const wxChar*) section);
|
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, (DWORD) (const wxChar*) section);
|
||||||
else
|
else
|
||||||
KeywordSearch(section);
|
KeywordSearch(section);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use context number
|
// Use context number
|
||||||
bool wxCHMHelpController::DisplaySection(int section)
|
bool wxCHMHelpController::DisplaySection(int section)
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_CONTEXT, (DWORD)section);
|
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_CONTEXT, (DWORD)section);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::DisplayContextPopup(int contextId)
|
bool wxCHMHelpController::DisplayContextPopup(int contextId)
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ bool wxCHMHelpController::DisplayContextPopup(int contextId)
|
|||||||
popup.pszText = NULL;
|
popup.pszText = NULL;
|
||||||
|
|
||||||
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::DisplayTextPopup(const wxString& text, const wxPoint& pos)
|
bool wxCHMHelpController::DisplayTextPopup(const wxString& text, const wxPoint& pos)
|
||||||
@@ -189,7 +189,7 @@ bool wxCHMHelpController::DisplayTextPopup(const wxString& text, const wxPoint&
|
|||||||
popup.pszText = (const wxChar*) text;
|
popup.pszText = (const wxChar*) text;
|
||||||
|
|
||||||
gs_htmlHelp(GetSuitableHWND(), NULL, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
gs_htmlHelp(GetSuitableHWND(), NULL, HH_DISPLAY_TEXT_POPUP, (DWORD) & popup);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::DisplayBlock(long block)
|
bool wxCHMHelpController::DisplayBlock(long block)
|
||||||
@@ -200,7 +200,7 @@ bool wxCHMHelpController::DisplayBlock(long block)
|
|||||||
bool wxCHMHelpController::KeywordSearch(const wxString& k,
|
bool wxCHMHelpController::KeywordSearch(const wxString& k,
|
||||||
wxHelpSearchMode WXUNUSED(mode))
|
wxHelpSearchMode WXUNUSED(mode))
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
@@ -215,14 +215,14 @@ bool wxCHMHelpController::KeywordSearch(const wxString& k,
|
|||||||
link.fIndexOnFail = TRUE ;
|
link.fIndexOnFail = TRUE ;
|
||||||
|
|
||||||
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_KEYWORD_LOOKUP, (DWORD)& link);
|
gs_htmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_KEYWORD_LOOKUP, (DWORD)& link);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCHMHelpController::Quit()
|
bool wxCHMHelpController::Quit()
|
||||||
{
|
{
|
||||||
gs_htmlHelp(GetSuitableHWND(), 0, HH_CLOSE_ALL, 0L);
|
gs_htmlHelp(GetSuitableHWND(), 0, HH_CLOSE_ALL, 0L);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append extension if necessary.
|
// Append extension if necessary.
|
||||||
|
@@ -50,19 +50,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase)
|
|||||||
bool wxWinHelpController::Initialize(const wxString& filename)
|
bool wxWinHelpController::Initialize(const wxString& filename)
|
||||||
{
|
{
|
||||||
m_helpFile = filename;
|
m_helpFile = filename;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWinHelpController::LoadFile(const wxString& file)
|
bool wxWinHelpController::LoadFile(const wxString& file)
|
||||||
{
|
{
|
||||||
if (!file.IsEmpty())
|
if (!file.IsEmpty())
|
||||||
m_helpFile = file;
|
m_helpFile = file;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWinHelpController::DisplayContents(void)
|
bool wxWinHelpController::DisplayContents(void)
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ bool wxWinHelpController::DisplayContents(void)
|
|||||||
bool wxWinHelpController::DisplaySection(int section)
|
bool wxWinHelpController::DisplaySection(int section)
|
||||||
{
|
{
|
||||||
// Use context number
|
// Use context number
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ bool wxWinHelpController::DisplaySection(int section)
|
|||||||
|
|
||||||
bool wxWinHelpController::DisplayContextPopup(int contextId)
|
bool wxWinHelpController::DisplayContextPopup(int contextId)
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
@@ -95,13 +95,13 @@ bool wxWinHelpController::DisplayContextPopup(int contextId)
|
|||||||
bool wxWinHelpController::DisplayBlock(long block)
|
bool wxWinHelpController::DisplayBlock(long block)
|
||||||
{
|
{
|
||||||
DisplaySection(block);
|
DisplaySection(block);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWinHelpController::KeywordSearch(const wxString& k,
|
bool wxWinHelpController::KeywordSearch(const wxString& k,
|
||||||
wxHelpSearchMode WXUNUSED(mode))
|
wxHelpSearchMode WXUNUSED(mode))
|
||||||
{
|
{
|
||||||
if (m_helpFile.IsEmpty()) return FALSE;
|
if (m_helpFile.IsEmpty()) return false;
|
||||||
|
|
||||||
wxString str = GetValidFilename(m_helpFile);
|
wxString str = GetValidFilename(m_helpFile);
|
||||||
|
|
||||||
|
@@ -135,7 +135,7 @@ bool wxIcon::LoadFile(const wxString& filename,
|
|||||||
if ( !handler )
|
if ( !handler )
|
||||||
{
|
{
|
||||||
// say something?
|
// say something?
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return handler->Load(this, filename, type, desiredWidth, desiredHeight);
|
return handler->Load(this, filename, type, desiredWidth, desiredHeight);
|
||||||
|
@@ -246,11 +246,11 @@ bool wxImageList::RemoveAll()
|
|||||||
(void)Remove(0);
|
(void)Remove(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draws the given image on a dc at the specified position.
|
// Draws the given image on a dc at the specified position.
|
||||||
// If 'solidBackground' is TRUE, Draw sets the image list background
|
// If 'solidBackground' is true, Draw sets the image list background
|
||||||
// colour to the background colour of the wxDC, to speed up
|
// colour to the background colour of the wxDC, to speed up
|
||||||
// drawing by eliminating masked drawing where possible.
|
// drawing by eliminating masked drawing where possible.
|
||||||
bool wxImageList::Draw(int index,
|
bool wxImageList::Draw(int index,
|
||||||
@@ -260,7 +260,7 @@ bool wxImageList::Draw(int index,
|
|||||||
bool solidBackground)
|
bool solidBackground)
|
||||||
{
|
{
|
||||||
HDC hDC = GetHdcOf(dc);
|
HDC hDC = GetHdcOf(dc);
|
||||||
wxCHECK_MSG( hDC, FALSE, _T("invalid wxDC in wxImageList::Draw") );
|
wxCHECK_MSG( hDC, false, _T("invalid wxDC in wxImageList::Draw") );
|
||||||
|
|
||||||
COLORREF clr = CLR_NONE; // transparent by default
|
COLORREF clr = CLR_NONE; // transparent by default
|
||||||
if ( solidBackground )
|
if ( solidBackground )
|
||||||
@@ -301,7 +301,7 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask)
|
|||||||
{
|
{
|
||||||
HBITMAP hbmpMask;
|
HBITMAP hbmpMask;
|
||||||
wxMask *pMask;
|
wxMask *pMask;
|
||||||
bool deleteMask = FALSE;
|
bool deleteMask = false;
|
||||||
|
|
||||||
if ( mask.Ok() )
|
if ( mask.Ok() )
|
||||||
{
|
{
|
||||||
@@ -322,7 +322,7 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask)
|
|||||||
|
|
||||||
pMask = new wxMask(bitmap, col);
|
pMask = new wxMask(bitmap, col);
|
||||||
|
|
||||||
deleteMask = TRUE;
|
deleteMask = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
hbmpMask = (HBITMAP)pMask->GetMaskBitmap();
|
hbmpMask = (HBITMAP)pMask->GetMaskBitmap();
|
||||||
|
@@ -205,28 +205,28 @@ bool wxIniConfig::GetFirstGroup(wxString& WXUNUSED(str), long& WXUNUSED(lIndex))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::GetNextGroup (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
bool wxIniConfig::GetNextGroup (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::GetFirstEntry(wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
bool wxIniConfig::GetFirstEntry(wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::GetNextEntry (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
bool wxIniConfig::GetNextEntry (wxString& WXUNUSED(str), long& WXUNUSED(lIndex)) const
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -252,14 +252,14 @@ bool wxIniConfig::HasGroup(const wxString& WXUNUSED(strName)) const
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::HasEntry(const wxString& WXUNUSED(strName)) const
|
bool wxIniConfig::HasEntry(const wxString& WXUNUSED(strName)) const
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("not implemented");
|
wxFAIL_MSG("not implemented");
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// is current group empty?
|
// is current group empty?
|
||||||
@@ -270,13 +270,13 @@ bool wxIniConfig::IsEmpty() const
|
|||||||
GetPrivateProfileString(m_strGroup, NULL, "",
|
GetPrivateProfileString(m_strGroup, NULL, "",
|
||||||
szBuf, WXSIZEOF(szBuf), m_strLocalFilename);
|
szBuf, WXSIZEOF(szBuf), m_strLocalFilename);
|
||||||
if ( !::IsEmpty(szBuf) )
|
if ( !::IsEmpty(szBuf) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
GetProfileString(m_strGroup, NULL, "", szBuf, WXSIZEOF(szBuf));
|
GetProfileString(m_strGroup, NULL, "", szBuf, WXSIZEOF(szBuf));
|
||||||
if ( !::IsEmpty(szBuf) )
|
if ( !::IsEmpty(szBuf) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -302,10 +302,10 @@ bool wxIniConfig::DoReadString(const wxString& szKey, wxString *pstr) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ::IsEmpty(szBuf) )
|
if ( ::IsEmpty(szBuf) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
*pstr = szBuf;
|
*pstr = szBuf;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const
|
bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const
|
||||||
@@ -322,7 +322,7 @@ bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const
|
|||||||
if ( lVal != nMagic ) {
|
if ( lVal != nMagic ) {
|
||||||
// the value was read from the file
|
// the value was read from the file
|
||||||
*pl = lVal;
|
*pl = lVal;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// is it really nMagic?
|
// is it really nMagic?
|
||||||
@@ -330,7 +330,7 @@ bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const
|
|||||||
if ( lVal != nMagic2 ) {
|
if ( lVal != nMagic2 ) {
|
||||||
// the nMagic it returned was indeed read from the file
|
// the nMagic it returned was indeed read from the file
|
||||||
*pl = lVal;
|
*pl = lVal;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CS : I have no idea why they should look up in win.ini
|
// CS : I have no idea why they should look up in win.ini
|
||||||
@@ -340,9 +340,9 @@ bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const
|
|||||||
// no, it was just returning the default value, so now look in win.ini
|
// no, it was just returning the default value, so now look in win.ini
|
||||||
*pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
|
*pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
return FALSE ;
|
return false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::DoWriteString(const wxString& szKey, const wxString& szValue)
|
bool wxIniConfig::DoWriteString(const wxString& szKey, const wxString& szValue)
|
||||||
@@ -386,10 +386,10 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
|
|||||||
|
|
||||||
if (WritePrivateProfileString(m_strGroup, strKey,
|
if (WritePrivateProfileString(m_strGroup, strKey,
|
||||||
(const char*) NULL, m_strLocalFilename) == 0)
|
(const char*) NULL, m_strLocalFilename) == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if ( !bGroupIfEmptyAlso || !IsEmpty() )
|
if ( !bGroupIfEmptyAlso || !IsEmpty() )
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
// delete the current group too
|
// delete the current group too
|
||||||
bool bOk = WritePrivateProfileString(m_strGroup, NULL,
|
bool bOk = WritePrivateProfileString(m_strGroup, NULL,
|
||||||
@@ -442,24 +442,24 @@ bool wxIniConfig::DeleteAll()
|
|||||||
|
|
||||||
if ( wxFile::Exists(strFile) && !wxRemoveFile(strFile) ) {
|
if ( wxFile::Exists(strFile) && !wxRemoveFile(strFile) ) {
|
||||||
wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
|
wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::RenameEntry(const wxString& WXUNUSED(oldName),
|
bool wxIniConfig::RenameEntry(const wxString& WXUNUSED(oldName),
|
||||||
const wxString& WXUNUSED(newName))
|
const wxString& WXUNUSED(newName))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxIniConfig::RenameGroup(const wxString& WXUNUSED(oldName),
|
bool wxIniConfig::RenameGroup(const wxString& WXUNUSED(oldName),
|
||||||
const wxString& WXUNUSED(newName))
|
const wxString& WXUNUSED(newName))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user