Updated Scintilla to version 1.70
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,14 +47,21 @@ wxColour wxColourFromCA(const ColourAllocated& ca) {
|
||||
Palette::Palette() {
|
||||
used = 0;
|
||||
allowRealization = false;
|
||||
size = 100;
|
||||
entries = new ColourPair[size];
|
||||
}
|
||||
|
||||
Palette::~Palette() {
|
||||
Release();
|
||||
delete [] entries;
|
||||
entries = 0;
|
||||
}
|
||||
|
||||
void Palette::Release() {
|
||||
used = 0;
|
||||
delete [] entries;
|
||||
size = 100;
|
||||
entries = new ColourPair[size];
|
||||
}
|
||||
|
||||
// This method either adds a colour to the list of wanted colours (want==true)
|
||||
@@ -67,11 +74,20 @@ void Palette::WantFind(ColourPair &cp, bool want) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (used < numEntries) {
|
||||
entries[used].desired = cp.desired;
|
||||
entries[used].allocated.Set(cp.desired.AsLong());
|
||||
used++;
|
||||
if (used >= size) {
|
||||
int sizeNew = size * 2;
|
||||
ColourPair *entriesNew = new ColourPair[sizeNew];
|
||||
for (int j=0; j<size; j++) {
|
||||
entriesNew[j] = entries[j];
|
||||
}
|
||||
delete []entries;
|
||||
entries = entriesNew;
|
||||
size = sizeNew;
|
||||
}
|
||||
|
||||
entries[used].desired = cp.desired;
|
||||
entries[used].allocated.Set(cp.desired.AsLong());
|
||||
used++;
|
||||
} else {
|
||||
for (int i=0; i < used; i++) {
|
||||
if (entries[i].desired == cp.desired) {
|
||||
@@ -162,6 +178,8 @@ public:
|
||||
virtual void FillRectangle(PRectangle rc, ColourAllocated back);
|
||||
virtual void FillRectangle(PRectangle rc, Surface &surfacePattern);
|
||||
virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back);
|
||||
virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
|
||||
ColourAllocated outline, int alphaOutline, int flags);
|
||||
virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back);
|
||||
virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource);
|
||||
|
||||
@@ -316,6 +334,14 @@ void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAl
|
||||
hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4);
|
||||
}
|
||||
|
||||
void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
|
||||
ColourAllocated fill, int alphaFill,
|
||||
ColourAllocated outline, int alphaOutline, int flags) {
|
||||
// ** TODO
|
||||
|
||||
RectangleDraw(rc, outline, fill);
|
||||
}
|
||||
|
||||
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
||||
PenColour(fore);
|
||||
BrushColour(back);
|
||||
|
Reference in New Issue
Block a user