Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\stc\PlatWX.cpp
Last modified2005-09-18 10:01:50.001 +0200
Size35 Kb (1379 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\stc\PlatWX.cpp
Last modified2006-03-16 13:06:58.001 +0100
Size35.9 Kb (1399 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged251344
Inserted423
Deleted27
Ignored00
Changed1860



   Comparison Details  

5 skipped lines
6U6U 
7U7U#include <ctype.h>
8U8U 
9C#include <wx/wx.h> 9C#include "wx/wx.h"
10C#include <wx/encconv.h> 10C#include "wx/encconv.h"
11C#include <wx/listctrl.h> 11C#include "wx/listctrl.h"
12C#include <wx/mstream.h> 12C#include "wx/mstream.h"
13C#include <wx/image.h> 13C#include "wx/image.h"
14C#include <wx/imaglist.h> 14C#include "wx/imaglist.h"
  15C#include "wx/tokenzr.h"
15U16U 
16U17U#include "Platform.h"
17U18U#include "PlatWX.h"
89 skipped lines
107U108U    // so we adjust the encoding before passing it to Scintilla.  See also
108U109U    // wxStyledTextCtrl::StyleSetCharacterSet
109U110U    wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
110C      111C 
111U112U    wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
112U113U    if (ea.GetCount())
113U114U        encoding = ea[0];
487 skipped lines
601U602U 
602U603U 
603U604Uvoid Window::SetTitle(const char *s) {
604C    GETWIN(id)->SetTitle(stc2wx(s)); 605C    GETWIN(id)->SetLabel(stc2wx(s));
605U606U}
606U607U 
607U608U 
58 skipped lines
666U667U 
667U668U 
668U669U 
669C#if wxUSE_POPUPWIN //-----------------------------------    670C#if wxUSE_POPUPWIN //-----------------------------------
670U671U#include <wx/popupwin.h>
671U672U 
672U673U 
3 skipped lines
676U677U// implement wxPopupWindow for the Mac!!)
677U678U//
678U679U// In the meantime, be careful to duplicate any changes as needed...
679C//     680C//
680C      681C 
681C// A popup window to place the wxSTCListBox upon     682C// A popup window to place the wxSTCListBox upon
682U683Uclass wxSTCListBoxWin : public wxPopupWindow
683U684U{
684U685Uprivate:
1 skipped line
686U687U    CallBackAction      doubleClickAction;
687U688U    void*               doubleClickActionData;
688U689Upublic:
689C    wxSTCListBoxWin(wxWindow* parent, wxWindowID id) : 690C    wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
690U691U        wxPopupWindow(parent, wxBORDER_NONE)
691U692U    {
692U693U        SetBackgroundColour(*wxBLACK);  // for our simple border
9 skipped lines
702U703U        // "right" to the user.  But since the wxPopupWindow or its children
703U704U        // can't receive focus then we have to pull a fast one and temporarily
704U705U        // parent the listctrl on the STC window and then call SetFocus and
705C        // then reparent it back to the popup.  706C        // then reparent it back to the popup.
706U707U        lv->SetFocus();
707U708U        lv->Reparent(this);
708U709U#ifdef __WXMSW__
84 skipped lines
793U794U    EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
794U795UEND_EVENT_TABLE()
795U796U 
796C      797C 
797U798U 
798U799U#else // wxUSE_POPUPWIN -----------------------------------
799U800U 
4 skipped lines
804U805U    CallBackAction      doubleClickAction;
805U806U    void*               doubleClickActionData;
806U807Upublic:
807C    wxSTCListBoxWin(wxWindow* parent, wxWindowID id) : 808C    wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) :
808C        wxWindow(parent, id, wxDefaultPositionwxSize(0,0), wxSIMPLE_BORDER ) 809C        wxWindow(parent, id, wxPoint(location.x, location.y), wxSize(0,0), wxSIMPLE_BORDER )
809U810U    {
810U811U 
811U812U        lv = new wxSTCListBox(this, id, wxDefaultPosition, wxDefaultSize,
69 skipped lines
881U882U        return rv;
882U883U    }
883U884U#endif
884C      885C 
885U886U    void OnActivate(wxListEvent& WXUNUSED(event)) {
886U887U        doubleClickAction(doubleClickActionData);
887U888U    }
30 skipped lines
918U919U    bool                unicodeMode;
919U920U    int                 desiredVisibleRows;
920U921U    int                 aveCharWidth;
921C    int                 maxStrWidth; 922C    size_t              maxStrWidth;
  923C    Point               location;       // Caret location at which the list is opened
922U924U    wxImageList*        imgList;
923U925U    wxArrayInt*         imgTypeMap;
924U926U 
2 skipped lines
927U929U    ~ListBoxImpl();
928U930U 
929U931U    virtual void SetFont(Font &font);
930C    virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_); 932C    virtual void Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_);
931U933U    virtual void SetAverageCharWidth(int width);
932U934U    virtual void SetVisibleRows(int rows);
  935A    virtual int GetVisibleRows() const;
933U936U    virtual PRectangle GetDesiredRect();
934U937U    virtual int CaretFromEdge();
935U938U    virtual void Clear();
936U939U    virtual void Append(char *s, int type = -1);
  940A            void Append(const wxString& text, int type);
937U941U    virtual int Length();
938U942U    virtual void Select(int n);
939U943U    virtual int GetSelection();
2 skipped lines
942U946U    virtual void RegisterImage(int type, const char *xpm_data);
943U947U    virtual void ClearRegisteredImages();
944U948U    virtual void SetDoubleClickAction(CallBackAction, void *);
945C  949C    virtual void SetList(const char* list, char separator, char typesep);
946U950U};
947U951U 
948U952U 
21 skipped lines
970U974U}
971U975U 
972U976U 
973Cvoid ListBoxImpl::Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_) { 977Cvoid ListBoxImpl::Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_) {
  978C    location = location_;
974U979U    lineHeight =  lineHeight_;
975U980U    unicodeMode = unicodeMode_;
976U981U    maxStrWidth = 0;
977C    id = new wxSTCListBoxWin(GETWIN(parent.GetID()), ctrlID); 982C    id = new wxSTCListBoxWin(GETWIN(parent.GetID()), ctrlID, location);
978U983U    if (imgList != NULL)
979U984U        GETLB(id)->SetImageList(imgList, wxIMAGE_LIST_SMALL);
980U985U}
9 skipped lines
990U995U}
991U996U 
992U997U 
  998Aint ListBoxImpl::GetVisibleRows() const {
  999A    return desiredVisibleRows;
  1000A}
  1001A 
993U1002UPRectangle ListBoxImpl::GetDesiredRect() {
994U1003U    // wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of
995U1004U    // the max size in Append and calculate it here...
996C    int maxw = maxStrWidth; 1005C    int maxw = maxStrWidth * aveCharWidth;
997U1006U    int maxh ;
998U1007U 
999U1008U    // give it a default if there are no lines, and/or add a bit more
39 skipped lines
1039U1048U 
1040U1049U 
1041U1050Uvoid ListBoxImpl::Append(char *s, int type) {
1042C    wxString text = stc2wx(s); 1051C    Append(stc2wx(s), type);
  1052C}
  1053C 
  1054Cvoid ListBoxImpl::Append(const wxString& text, int type) {
1043U1055U    long count  = GETLB(id)->GetItemCount();
1044U1056U    long itemID  = GETLB(id)->InsertItem(count, wxEmptyString);
1045U1057U    GETLB(id)->SetItem(itemID, 1, text);
1046C    int itemWidth = 0;  
1047C    GETLB(id)->GetTextExtent(text, &itemWidth, NULL);  
1048C    maxStrWidth = wxMax(maxStrWidth, itemWidth); 1058C    maxStrWidth = wxMax(maxStrWidth, text.length());
1049U1059U    if (type != -1) {
1050U1060U        wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
1051U1061U        long idx = imgTypeMap->Item(type);
1 skipped line
1053U1063U    }
1054U1064U}
1055U1065U 
  1066Avoid ListBoxImpl::SetList(const char* list, char separator, char typesep) {
  1067A    GETLB(id)->Freeze();
  1068A    Clear();
  1069A    wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
  1070A    while ( tkzr.HasMoreTokens() ) {
7 skipped lines
  1078A        Append(token, (int)type);
  1079A    }
  1080A    GETLB(id)->Thaw();
  1081A}
  1082A 
1056U1083U 
1057U1084Uint ListBoxImpl::Length() {
1058U1085U    return GETLB(id)->GetItemCount();
74 skipped lines
1133U1160U}
1134U1161U 
1135U1162U 
1136R   
1137U1163UListBox::ListBox() {
1138U1164U}
1139U1165U 
230 skipped lines
1370U1396U}
1371U1397U 
1372U1398U#endif
1373R   
1374R   
1375R   
1376R   
1377R   
1378R   
1379U1399U 

   Text comparison Options  

Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

UExample of unchanged line
CExample of modified line
AExample of added line
RExample of removed line
IExample of ignored line
Modified text
Added text
Removed text

This report has been generated by Ellié Computing Merge on 2006-09-07 16:23:28.001 +0200.
© 2005-2006 Ellié Computing http://www.elliecomputing.com. All rights reserved.