]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/helphtml.cpp
removed carbon printing code
[wxWidgets.git] / src / generic / helphtml.cpp
index 816c0e12a61c8898ec11709ff0b40d0ab8cbfd04..8378a1496f7edb2fcc4a3f0291b2e97fbfca0d66 100644 (file)
@@ -86,12 +86,12 @@ wxHTMLHelpControllerBase::DeleteList()
 {
    if(m_MapList)
    {
-      wxNode *node = m_MapList->First();
+      wxNode *node = m_MapList->GetFirst();
       while (node)
       {
-         delete (wxExtHelpMapEntry *)node->Data();
+         delete (wxExtHelpMapEntry *)node->GetData();
          delete node;
-         node = m_MapList->First();
+         node = m_MapList->GetFirst();
       }
       delete m_MapList;
       m_MapList = (wxList*) NULL;
@@ -133,7 +133,11 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
          wxChar* f = wxGetWorkingDirectory();
          file = f;
          delete[] f; // wxGetWorkingDirectory returns new memory
+#ifdef __WXMAC__
+         file << ifile;
+#else
          file << WXEXTHELP_SEPARATOR << ifile;
+#endif
       }
       else
          file = ifile;
@@ -191,15 +195,15 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
             break; // error
          for(i=0; isdigit(buffer[i])||isspace(buffer[i])||buffer[i]=='-'; i++)
             ; // find begin of URL
-         url = "";
+         url = wxT("");
          while(buffer[i] && ! isspace(buffer[i]) && buffer[i] !=
                WXEXTHELP_COMMENTCHAR)
-            url << buffer[i++];
+            url << (wxChar) buffer[i++];
          while(buffer[i] && buffer[i] != WXEXTHELP_COMMENTCHAR)
             i++;
-         doc = "";
+         doc = wxT("");
          if(buffer[i])
-            doc = (buffer + i + 1); // skip the comment character
+            doc = wxString::FromAscii( (buffer + i + 1) ); // skip the comment character
          m_MapList->Append(new wxExtHelpMapEntry(id,url,doc));
          m_NumOfEntries++;
       }
@@ -218,17 +222,17 @@ wxHTMLHelpControllerBase::DisplayContents()
       return FALSE;
 
    wxString contents;
-   wxNode *node = m_MapList->First();
+   wxNode *node = m_MapList->GetFirst();
    wxExtHelpMapEntry *entry;
    while(node)
    {
-      entry = (wxExtHelpMapEntry *)node->Data();
+      entry = (wxExtHelpMapEntry *)node->GetData();
       if(entry->id == CONTENTS_ID)
       {
          contents = entry->url;
          break;
       }
-      node = node->Next();
+      node = node->GetNext();
    }
 
    bool rc = FALSE;
@@ -250,14 +254,14 @@ wxHTMLHelpControllerBase::DisplaySection(int sectionNo)
       return FALSE;
 
    wxBusyCursor b; // display a busy cursor
-   wxNode *node = m_MapList->First();
+   wxNode *node = m_MapList->GetFirst();
    wxExtHelpMapEntry *entry;
    while(node)
    {
-      entry = (wxExtHelpMapEntry *)node->Data();
+      entry = (wxExtHelpMapEntry *)node->GetData();
       if(entry->id == sectionNo)
          return DisplayHelp(entry->url);
-      node = node->Next();
+      node = node->GetNext();
    }
    return FALSE;
 }
@@ -291,7 +295,7 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
    int          idx = 0, j;
    bool         rc;
    bool         showAll = k.IsEmpty();
-   wxNode       *node = m_MapList->First();
+   wxNode       *node = m_MapList->GetFirst();
    wxExtHelpMapEntry *entry;
 
    {
@@ -299,7 +303,7 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
       compA = k; compA.LowerCase(); // we compare case insensitive
       while(node)
       {
-         entry = (wxExtHelpMapEntry *)node->Data();
+         entry = (wxExtHelpMapEntry *)node->GetData();
          compB = entry->doc; compB.LowerCase();
          if((showAll || compB.Contains(k)) && ! compB.IsEmpty())
          {
@@ -308,13 +312,13 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
             // choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR));
             //if(choices[idx].IsEmpty()) // didn't contain the ';'
             //   choices[idx] = (**i).doc;
-            choices[idx] = "";
+            choices[idx] = wxT("");
             for(j=0;entry->doc.c_str()[j]
                    && entry->doc.c_str()[j] != WXEXTHELP_COMMENTCHAR; j++)
                choices[idx] << entry->doc.c_str()[j];
             idx++;
          }
-         node = node->Next();
+         node = node->GetNext();
       }
    }