T++ & actual topics

git-svn-id: svn://ultimatepp.org/upp/trunk@580 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-31 12:15:30 +00:00
parent bf3a147751
commit faadb977dc
14 changed files with 1510 additions and 816 deletions

View file

@ -354,16 +354,8 @@ void LaunchWebBrowser(const String& url)
String GetDataFile(const char *filename)
{
String s = Environment().Get("UPP_MAIN__",
#ifdef PLATFORM_WIN32
GetFileFolder(GetExeFilePath())
#endif
#ifdef PLATFORM_POSIX
GetHomeDirectory()
#endif
);
return AppendFileName(s, filename);
String s = GetEnv("UPP_MAIN__");
return s.GetCount() ? AppendFileName(s, filename) : GetExeDirFile(filename);
}
String GetComputerName()

View file

@ -196,7 +196,6 @@ inline void AssertMoveable0(T *t) { AssertMoveablePtr(&**t, *t); }
template <class T, class B = EmptyClass>
struct Moveable : public B {
friend void AssertMoveable0(T *) {}
// void operator=(const Moveable& b) { B::operator = (b); } // MSC 6.0 empty base class bug fix
};
template <class T>
@ -240,21 +239,16 @@ public:
{ ::new (dest) T(src, 0); }
friend T *DeepCopyNew(const T& src)
{ return ::new T(src, 0); }
// void operator=(const DeepCopyOption& b) { B::operator = (b); } // MSC 6.0 empty base class bug fix
};
template <class T, class B = EmptyClass>
class MoveableAndDeepCopyOption : public Moveable< T, DeepCopyOption<T, B> > {
public:
// void operator=(const MoveableAndDeepCopyOption& b) { B::operator = (b); } // MSC 6.0 empty base class bug fix
};
class MoveableAndDeepCopyOption : public Moveable< T, DeepCopyOption<T, B> > {};
template <class T, class B = EmptyClass>
class PolyDeepCopyNew : public B
{
public:
friend T *DeepCopyNew(const T& t) { return t.Copy(); }
// void operator=(const PolyDeepCopyNew& b) { B::operator = (b); } // MSC 6.0 empty base class bug fix
};
template <class T>

View file

@ -30,7 +30,7 @@ and [* SegtorMap].&]
oveable][*/ ]type with [*/^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ pick
and optional deep copy] transfer semantics, although these features
are more important in derived concrete index flavors.&]
[s0; &]
[s3; &]
[ {{10000F(128)G(128)@1 [s0; [* Public Method List]]}}&]
[s3;%- &]
[s5;:AMap`:`:Add`(const K`&`,const T`&`):%- [@(0.0.255) void]_[* Add]([@(0.0.255) const]_[*@4 K

View file

@ -10,9 +10,8 @@ topic "Any";
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}
[s3; &]
[s1;:Any`:`:class: [@(0.0.255) class]_[* Any]_:_[@(0.0.255) private]_[*@3 Moveable][@(0.0.255) <
][* Any][@(0.0.255) >]_&]
][* Any][@(0.0.255) >]&]
[s0;%% Any is a special type of container capable of containing none
or single element of [/ any] type. It also provides methods for
querying the type stored and retrieving the content of specific

View file

@ -20,31 +20,31 @@ your application and system environment.&]
[s0;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* Function List]]}}&]
[s3; &]
[s5;:GetExeFilePath`(`): String_[* GetExeFilePath]()&]
[s5;:GetExeFilePath`(`): [_^String^ String]_[* GetExeFilePath]()&]
[s2;#%% Returns the absolute path towards the application`'s binary.&]
[s3; &]
[s4; &]
[s5;:GetExeDirFile`(const char`*`): String_[* GetExeDirFile]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 fp])&]
[s5;:GetExeDirFile`(const char`*`): [_^String^ String]_[* GetExeDirFile]([@(0.0.255) const]_
[@(0.0.255) char]_`*[*@3 fp])&]
[s2;#%% Returns the absolute path of a file that is found in the
folder where you application`'s binary resides.&]
[s2;%% [@(129.0.0) fp..................................................]the
name of the file&]
[s3; &]
[s4; &]
[s5;:GetHomeDirectory`(`): String_[* GetHomeDirectory]()&]
[s5;:GetHomeDirectory`(`): [_^String^ String]_[* GetHomeDirectory]()&]
[s2;%% Returns the absolute path of current user`'s home folder.&]
[s3; &]
[s4; &]
[s5;:GetHomeDirFile`(const char`*`): String_[* GetHomeDirFile]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 fp])&]
[s5;:GetHomeDirFile`(const char`*`): [_^String^ String]_[* GetHomeDirFile]([@(0.0.255) cons
t]_[@(0.0.255) char]_`*[*@3 fp])&]
[s2;#%% Returns the absolute path of a file that is found in the
current user`'s home folder.&]
[s2;%% [@(129.0.0) fp..................................................]the
name of the file&]
[s3; &]
[s4; &]
[s5;:GetExeTitle`(`): String_[* GetExeTitle]()&]
[s5;:GetExeTitle`(`): [_^String^ String]_[* GetExeTitle]()&]
[s2;%% Returns the title of the application.&]
[s3; &]
[s4; &]
@ -57,27 +57,27 @@ binary resides.&]
home folder (true) or application folder (false)&]
[s3; &]
[s4; &]
[s5;:ConfigFile`(const char`*`): String_[* ConfigFile]([@(0.0.255) const]_[@(0.0.255) char]_
`*[*@3 file])&]
[s5;:ConfigFile`(const char`*`): [_^String^ String]_[* ConfigFile]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 file])&]
[s2;#%% Returns the absolute path of a configuration file found in
the configuration files search path.&]
[s2;%% [@(129.0.0) file ]...............................................the
name of the file&]
[s3; &]
[s4; &]
[s5;:ConfigFile`(`): String_[* ConfigFile]()&]
[s5;:ConfigFile`(`): [_^String^ String]_[* ConfigFile]()&]
[s2;#%% Returns the default configuration file from the configuration
files search path. The default configuration file is called [*/ `[application
title`]][* .cfg].&]
[s3; &]
[s4; &]
[s5;:CommandLine`(`): [@(0.0.255) const]_Vector[@(0.0.255) <]String[@(0.0.255) >`&]_[* Comman
dLine]()&]
[s5;:CommandLine`(`): [@(0.0.255) const]_[_^Vector^ Vector][@(0.0.255) <][_^String^ String][@(0.0.255) >
`&]_[* CommandLine]()&]
[s2;%% Return a vector of strings containing the command line parameters.&]
[s3; &]
[s4; &]
[s5;:Environment`(`): [@(0.0.255) const]_VectorMap[@(0.0.255) <]String,
String[@(0.0.255) >`&]_[* Environment]()&]
[s5;:Environment`(`): [@(0.0.255) const]_[_^VectorMap^ VectorMap][@(0.0.255) <][_^String^ Str
ing], [_^String^ String][@(0.0.255) >`&]_[* Environment]()&]
[s2;%% Returns a vector of strings with system environment variables.&]
[s3; &]
[s4; &]
@ -96,20 +96,33 @@ exit code&]
not yet exited the main function.&]
[s3; &]
[s4; &]
[s5;:GetDataFile`(const char`*`): String_[* GetDataFile]([@(0.0.255) const]_[@(0.0.255) cha
r]_`*[*@3 filename])&]
[s5;:GetDataFile`(const char`*`): [_^String^ String]_[* GetDataFile]([@(0.0.255) const]_[@(0.0.255) c
har]_`*[*@3 filename])&]
[s2;%% This function is designed to retrieve the path of file that
contains application specific data. Behaviour depends on whether
application was started from `'theide`' `- in that case theide
passes a reference to main package directory through environment
variable and the resulting file is in this directory. When started
standalone, the function is equivalent to ConfigFile.&]
[s2;%% [*@(129.0.0) filename].......................................the
name of the file&]
variable `"UPP`_MAIN`_`_`" and the resulting file is in this
directory. When started standalone, the function is equivalent
to GetExeDirFile.&]
[s3; &]
[s4; &]
[s5;:GetComputerName`(`): [_^String^ String]_[* GetComputerName]()&]
[s2;%% Returns the name of computer.&]
[s3; &]
[s4; &]
[s5;:GetUserName`(`): [_^String^ String]_[* GetUserName]()&]
[s2;%% Returns current user.&]
[s3; &]
[s4; &]
[s5;:GetDesktopManager`(`): [_^String^ String]_[* GetDesktopManager]()&]
[s2;%% Returns current GUI identifier. Predefined values are `"windows`",
`"gnome`", `"kde`". If X11 desktop manager is not in this list,
the value of `"DESKTOP`_SESSION`" environment variable is returned.&]
[s3; &]
[s4; &]
[s5;:LaunchWebBrowser`(const String`&`): [@(0.0.255) void]_[* LaunchWebBrowser]([@(0.0.255) c
onst]_String[@(0.0.255) `&]_[*@3 url])&]
onst]_[_^String^ String][@(0.0.255) `&]_[*@3 url])&]
[s2;%% Opens an URL in the default Web Browser.&]
[s2;%% [*@(129.0.0) url................................................]the
URL that will be opened in the browser&]

View file

@ -10,81 +10,75 @@ topic "Array";
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}%EN-US
[s0;~~~64; Array&]
[s0;~~~64; template <class [*@4 T]>&]
[s0;3 &]
[s5;K%- template_<[@(0.0.255) class][@(64) _][@4 T][@(64) >__][@(0.0.255) class][@(64) _]Array[@(64) _
:_][@(0.0.255) public][@(64) _][^`:`:MoveableAndDeepCopyOption^@(64) MoveableAndDeepCopy
Option][@(64) <_]Array[@(64) <][@4 T][@(64) >_>_]&]
[s0; &]
[s0; [*C@4 T]-|Type or base class of elements stored in the Array. There
[s0;i448;a25;kKO9;:noref:%- [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T][@(0.0.255) >]&]
[s1;:Array`:`:class:%- [@(0.0.255) class]_[* Array]_:_[@(0.0.255) public]_[*@3 MoveableAndDeep
CopyOption][@(0.0.255) <]_[* Array][@(0.0.255) <][*@4 T][@(0.0.255) >]_>&]
[s8; [*@4 T]-|Type or base class of elements stored in the Array. There
is no common requirement for T.&]
[s0; The most universal form of basic random access container. Its
[s9; The most universal form of basic random access container. Its
features are derived from fact that typically it is implemented
using indirect container of pointers to T like Vector<T`*>. Nevertheless
it supports common concepts as ownership of contained elements,
reference (not pointer) access to elements and so on.&]
[s0; It provides almost all operations of Vector with the same semantics
[s9; It provides almost all operations of Vector with the same semantics
and almost any Vector can be directly replaced by Array. On the
other hand, it provides some special operations impossible for
Vector and most important, it never invalidates references (that
means C`+`+ references and pointers) to elements (it often invalidates
iterators, though).&]
[s0; Array can be also used to store polymorphic elements `- stored
[s9; Array can be also used to store polymorphic elements `- stored
elements could be derived from T. To store such elements, you
pass a pointer to an element previously created on the heap.
Still, Array takes over ownership of such element (it e.g. deletes
it when appropriate). You can also use this method to create
an Array of elements that do not have either pick, deep copy
constructor nor default constructor.&]
[s0; There are also operations that allow detaching an element from
[s9; There are also operations that allow detaching an element from
an Array, removing it but not destroying. Pointer to such element
is returned from this operation and the Array gives up ownership.&]
[s0; Disadvantage of Array over Vector is performance `- most operations
[s9; Disadvantage of Array over Vector is performance `- most operations
are significantly slower than with Vectors (by factor up to 8,
it depends on the speed of malloc/free). Still, some operations
might be even faster, e.g. Insert and Remove operations usually
move much less memory.&]
[s0; As for memory, for small size of elements, Array memory consumption
[s9; As for memory, for small size of elements, Array memory consumption
is significantly higher than Vector consumption. As the size
of the elements grow, Array starts to be better than Vector.&]
[s0;~~~.704; Iterators to Array satisfy all C`+`+ standard library
requirements for random access iterator plus they allow assignment
(and copy constructor) and testing for 0 (that is NULL) pointer.&]
[s0; Like any other NTL container, Array is a [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
[s9; Iterators to Array satisfy all C`+`+ standard library requirements
for random access iterator plus they allow assignment (and copy
constructor) and testing for 0 (that is NULL) pointer.&]
[s9; Like any other NTL container, Array is a [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
oveable][*/ ]type with [*/^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ pick
and optional deep copy] transfer semantics. Calling methods of
a picked Array is logic error with the exceptions of&]
[s0; [C+75 void ][*C+75 operator`=][C+75 (pick`_ Array`& ][*C@3+75 v][C+75 )]&]
[s0; [C+75 void ][*C+75 operator<<`=][C+75 (const Array`& ][*C@3+75 v][C+75 )][+75
][/+75 (defined using DeepCopyOptionTemplate)]&]
[s0; [C+75 void ][*C+75 Clear][C+75 ()]&]
[s0; [C+75 bool ][*C+75 IsPicked][C+75 () const]&]
[s0; Optional deep copy is implemented through DeepCopyOptionTemplate
macro.&]
[s0; Members&]
[s0;3 &]
[s5;K%- T`&_Add[@(64) ()]&]
and optional deep copy] transfer semantics.&]
[s3; &]
[ {{10000F(128)G(128)@1 [s0; [* Public Member List]]}}&]
[s4;H0;%- &]
[s5;:Array`:`:Add`(`):%- [*@4 T][@(0.0.255) `&]_[* Add]()&]
[s2; Adds a new default constructed element to the Array.&]
[s6; Requires T to have default constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*/ Return value]-|Reference to newly added default constructed
element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Add[@(64) (][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Add`(const T`&`):%- [@(0.0.255) void]_[* Add]([@(0.0.255) const]_[*@4 T][@(0.0.255) `&
]_[*@3 x])&]
[s2; Adds a new element with specified value to the Array.&]
[s6; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|The value that is copied to newly created element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]AddPick[@(64) (pick`__T`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:AddPick`(pick`_ T`&`):%- [@(0.0.255) void]_[* AddPick]([@(0.128.128) pick`_]_
[*@4 T][@(0.0.255) `&]_[*@3 x])&]
[s2; Adds new element to the Array and picks value of parameter to
it. &]
[s6; Requires T to have pick constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|Source instance of T that is to be picked.&]
[s0;3 &]
[s5;K%- T`&_Add[@(64) (T_`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Add`(T`*`):%- [*@4 T][@(0.0.255) `&]_[* Add]([*@4 T]_`*[*@3 newt])&]
[s2; Adds a new element to the Array. Element is specified by pointer
to an object created using operator new. Array takes over ownership
of this object. This variant allows the use of an Array as a
@ -93,39 +87,48 @@ can be either T or a type derived from T. No constructor is applied.
&]
[s7; [*C@3 newt]-|Object to be added.&]
[s7; [*/ Return value]-|Reference to the new element (that is [* `*newt]).&]
[s0; &]
[s0;%- [* template<class TT>][*@4 TT]`&_[* Create]()&]
[s0;*%- &]
[s4;%- &]
[s5;:Array`:`:Create`(`):%- [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 TT][@(0.0.255) >]_
[*@4 TT][@(0.0.255) `&]_[* Create]()&]
[s2; Creates and adds a new element to the Array.&]
[s6; Requires T to have default constructor.&]
[s7; [*C@4 TT]-|Type of the new element.&]
[s7; [*/ Return value]-|Reference to the newly created element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) const][@(64) _T`&_]operator`[`][@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) )
_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`[`]`(int`)const:%- [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[* operat
or`[`]]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&]
[s2; Returns a reference to the element at the specified position.&]
[s7; [*C@3 i]-|Position of the element.&]
[s7; [*/ Return value]-|Constant reference to the element.&]
[s0;3 &]
[s5;K%- T`&_operator`[`][@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`[`]`(int`):%- [*@4 T][@(0.0.255) `&]_[* operator`[`]]([@(0.0.255) int]_
[*@3 i])&]
[s2; Returns a reference to the element at the specified position.&]
[s7; [*C@3 i]-|Position of element.&]
[s7; [*/ Return value]-|Reference to the element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) int][@(64) _]GetCount[@(64) ()_][@(0.0.255) const]&]
[s2; Return the number of elements in the Array.&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:GetCount`(`)const:%- [@(0.0.255) int]_[* GetCount]()_[@(0.0.255) const]&]
[s2; Returns the number of elements in the Array.&]
[s7; [*/ Return value]-|Actual number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) bool][@(64) _]IsEmpty[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:IsEmpty`(`)const:%- [@(0.0.255) bool]_[* IsEmpty]()_[@(0.0.255) const]&]
[s2; Tests whether Array is empty. Same as GetCount() `=`= 0.&]
[s7; [*/ Return value]-|true if Array is empty, false otherwise.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Trim[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Trim`(int`):%- [@(0.0.255) void]_[* Trim]([@(0.0.255) int]_[*@3 n])&]
[s2; Reduces the number of elements in the Array to the specified
number. Required number must be less than or equal to the actual
number of elements in the Array.&]
[s7; [*C@3 n]-|Required number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]SetCount[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:SetCount`(int`):%- [@(0.0.255) void]_[* SetCount]([@(0.0.255) int]_[*@3 n])&]
[s2; Changes the count of elements in the Array to the specified
value. If the required number of elements is greater than actual
number, the newly added elements are default constructed. If
@ -134,9 +137,10 @@ exactly match the required number of elements (unlike [* SetCountR]).&]
[s6; Requires T to have default constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 n]-|Required number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]SetCount[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) ,
][@(0.0.255) const][@(64) _][@4 T][@(64) `&_][@3 init][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:SetCount`(int`,const T`&`):%- [@(0.0.255) void]_[* SetCount]([@(0.0.255) int]_
[*@3 n], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 init])&]
[s2; Changes the count of elements in the Array to the specified
value. If the required number of elements is greater than the
actual number, the newly added elements are initialized to the
@ -147,8 +151,9 @@ required number of elements (unlike [* SetCountR]).&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 n]-|Required number of elements.&]
[s7; [*C@3 init]-|Initialization value of the newly added elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]SetCountR[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:SetCountR`(int`):%- [@(0.0.255) void]_[* SetCountR]([@(0.0.255) int]_[*@3 n])&]
[s2; Changes the count of elements in the Array to the specified
value. If the required number of elements is greater than the
actual number, the newly added elements are default constructed.
@ -159,9 +164,10 @@ capacity.&]
[s6; Requires T to have default constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 n]-|Required number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]SetCountR[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) ,
][@(0.0.255) const][@(64) _][@4 T][@(64) `&_][@3 init][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:SetCountR`(int`,const T`&`):%- [@(0.0.255) void]_[* SetCountR]([@(0.0.255) in
t]_[*@3 n], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 init])&]
[s2; Changes the count of elements in the Array to the specified
value. If the required number of elements is greater than the
actual number, the newly added elements are initialized to the
@ -173,13 +179,15 @@ other elements without further increasing capacity.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 n]-|Required number of elements.&]
[s7; [*C@3 init]-|Initialization value of the newly added elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Clear[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Clear`(`):%- [@(0.0.255) void]_[* Clear]()&]
[s2; Removes all elements from the Array. Capacity is also cleared
to zero.&]
[s6; Invalidates iterators to the Array.&]
[s0;3 &]
[s5;K%- T`&_At[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:At`(int`):%- [*@4 T][@(0.0.255) `&]_[* At]([@(0.0.255) int]_[*@3 i])&]
[s2; If the specified position is lower than the number of elements
in the Array ([* i < GetCount()]), returns a reference to the element
at the specified position. Otherwise increases the number of
@ -191,9 +199,10 @@ to allow adding other elements without further increasing capacity.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position of the required element.&]
[s7; [*/ Return value]-|Reference to the required element.&]
[s0;3 &]
[s5;K%- T`&_At[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) , ][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) )
]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:At`(int`,const T`&`):%- [*@4 T][@(0.0.255) `&]_[* At]([@(0.0.255) int]_[*@3 i],
[@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x])&]
[s2; If specified position is lower than number of elements in the
Array ([* i < GetCount()]), returns a reference to the element
at the specified position. Otherwise increases the number of
@ -207,23 +216,26 @@ capacity.&]
[s7; [*C@3 i]-|Position of the required element.&]
[s7; [*C@3 x]-|Initialization value of newly added elements.&]
[s7; [*/ Return value]-|Reference to the required element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Shrink[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Shrink`(`):%- [@(0.0.255) void]_[* Shrink]()&]
[s2; Minimizes memory consumption of the Array by decreasing the
capacity to the number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Reserve[@(64) (][@(0.0.255) int][@(64) _][@3 xtra][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Reserve`(int`):%- [@(0.0.255) void]_[* Reserve]([@(0.0.255) int]_[*@3 xtra])&]
[s2; Reserves capacity. If required capacity is greater than the
current capacity, capacity is increased to the required value.&]
[s7; [*C@3 xtra]-|Required capacity.&]
[s0;3 &]
[s5;K%- [@(0.0.255) int][@(64) _]GetAlloc[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:GetAlloc`(`)const:%- [@(0.0.255) int]_[* GetAlloc]()_[@(0.0.255) const]&]
[s2; Returns current capacity of the Array.&]
[s7; [*/ Return value]-|Capacity of the Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _][@4 T][@(64) `&_][@3 x][@(64) , ][@(0.0.255) int][@(64) _][@3 count][@(64) _
`=_][@3 1][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Set`(int`,const T`&`,int`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) int]_[*@3 i
], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x], [@(0.0.255) int]_[*@3 count]_`=_[@3 1])&]
[s2; Sets the requested number of elements starting at the position
[* i] to the specified value. If the required number of elements
exceeds existing elements of the Array then elements are added
@ -233,48 +245,54 @@ to the Array.&]
[s7; [*C@3 i]-|Starting position.&]
[s7; [*C@3 x]-|Value.&]
[s7; [*C@3 count]-|Number of elements.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Remove[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) int][@(64) _][@3 count][@(64) _`=_][@3 1][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Remove`(int`,int`):%- [@(0.0.255) void]_[* Remove]([@(0.0.255) int]_[*@3 i],
[@(0.0.255) int]_[*@3 count]_`=_[@3 1])&]
[s2; Removes requested number of elements.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 count]-|Number of elements to remove.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Remove[@(64) (][@(0.0.255) const][@(64) _][@(0.0.255) int][@(64) _
`*][@3 sorted`_list][@(64) , ][@(0.0.255) int][@(64) _][@3 n][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Remove`(const int`*`,int`):%- [@(0.0.255) void]_[* Remove]([@(0.0.255) const]_
[@(0.0.255) int]_`*[*@3 sorted`_list], [@(0.0.255) int]_[*@3 n])&]
[s2; Removes number of elements from the Array. Time of operation
almost does not depend on number of elements.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 sorted`_list]-|Pointer to the Array of positions to remove.
It must be sorted from lowest to greatest value.&]
[s7; [*C@3 n]-|Number of elements to remove.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Remove[@(64) (][@(0.0.255) const][@(64) _][^`:`:Vector^@(64) Ve
ctor][@(64) <][^int^@(64) int][@(64) >`&_][@3 sorted`_list][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Remove`(const Vector`<int`>`&`):%- [@(0.0.255) void]_[* Remove]([@(0.0.255) c
onst]_[_^Vector^ Vector][@(0.0.255) <int>`&]_[*@3 sorted`_list])&]
[s2; Removes number of elements from the Array. Same as [* Remove(sorted`_list,
sorted`_list.GetCount())].&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 sorted`_list]-|Sorted Vector of positions to remove.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]InsertN[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) int][@(64) _][@3 count][@(64) _`=_][@3 1][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:InsertN`(int`,int`):%- [@(0.0.255) void]_[* InsertN]([@(0.0.255) int]_[*@3 i],
[@(0.0.255) int]_[*@3 count]_`=_[@3 1])&]
[s2; Inserts a specified number of default constructed elements at
the specified position.&]
[s6; Requires T to have default constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 count]-|Number of elements to insert.&]
[s0;3 &]
[s5;K%- T`&_Insert[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Insert`(int`):%- [*@4 T][@(0.0.255) `&]_[* Insert]([@(0.0.255) int]_[*@3 i])&]
[s2; Inserts one default constructed element at the specified position.&]
[s7; [*1 Requires T to have default constructor.]&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Insert[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _][@4 T][@(64) `&_][@3 x][@(64) , ][@(0.0.255) int][@(64) _][@3 count][@(64) _
`=_][@3 1][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Insert`(int`,const T`&`,int`):%- [@(0.0.255) void]_[* Insert]([@(0.0.255) int
]_[*@3 i], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x], [@(0.0.255) int]_[*@3 count]_`=_[@3 1
])&]
[s2; Inserts a specified number of elements, setting them to a specified
value.&]
[s6;~~~.992; Requires T to have deep copy constructor.&]
@ -282,18 +300,20 @@ value.&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 x]-|Value of the inserted elements.&]
[s7; [*C@3 count]-|Number of elements to insert.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Insert[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _][^`:`:Array^@(64) Array][@(64) `&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Insert`(int`,const Array`&`):%- [@(0.0.255) void]_[* Insert]([@(0.0.255) int]_
[*@3 i], [@(0.0.255) const]_[_^Array^ Array][@(0.0.255) `&]_[*@3 x])&]
[s2; Inserts all elements from another Array.&]
[s6;~~~.992; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 x]-|Source Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Insert[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _][^`:`:Array^@(64) Array][@(64) `&_][@3 x][@(64) ,
][@(0.0.255) int][@(64) _][@3 offset][@(64) , ][@(0.0.255) int][@(64) _][@3 count][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Insert`(int`,const Array`&`,int`,int`):%- [@(0.0.255) void]_[* Insert]([@(0.0.255) i
nt]_[*@3 i], [@(0.0.255) const]_[_^Array^ Array][@(0.0.255) `&]_[*@3 x],
[@(0.0.255) int]_[*@3 offset], [@(0.0.255) int]_[*@3 count])&]
[s2; Inserts a range of elements from another Array.&]
[s6;~~~.992; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the Array.&]
@ -302,26 +322,29 @@ value.&]
[s7; [*C@3 offset]-|Position of first element in source Array to be
inserted.&]
[s7; [*C@3 count]-|Number of elements to insert.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Append[@(64) (][@(0.0.255) const][@(64) _][^`:`:Array^@(64) Arr
ay][@(64) `&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Append`(const Array`&`):%- [@(0.0.255) void]_[* Append]([@(0.0.255) const]_[_^Array^ A
rray][@(0.0.255) `&]_[*@3 x])&]
[s2; Appends all elements of source Array.&]
[s6;~~~.992; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|Source Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Append[@(64) (][@(0.0.255) const][@(64) _][^`:`:Array^@(64) Arr
ay][@(64) `&_][@3 x][@(64) , ][@(0.0.255) int][@(64) _][@3 o][@(64) , ][@(0.0.255) int][@(64) _][@3 c
][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Append`(const Array`&`,int`,int`):%- [@(0.0.255) void]_[* Append]([@(0.0.255) c
onst]_[_^Array^ Array][@(0.0.255) `&]_[*@3 x], [@(0.0.255) int]_[*@3 o],
[@(0.0.255) int]_[*@3 c])&]
[s2; Appends a range of elements from source Array.&]
[s6;~~~.992; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|Source Array.&]
[s7; [*C@3 o]-|Position of the first element in source Array to be inserted.&]
[s7; [*C@3 c]-|Number of elements to insert.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]InsertPick[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
pick`__][^`:`:Array^@(64) Array][@(64) `&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:InsertPick`(int`,pick`_ Array`&`):%- [@(0.0.255) void]_[* InsertPick]([@(0.0.255) i
nt]_[*@3 i], [@(0.128.128) pick`_]_[_^Array^ Array][@(0.0.255) `&]_[*@3 x])&]
[s2; Inserts the source Array at the specified position using pick
transfer semantics. It is faster than deep copy insert, does
not use deep copy constructor for T, but destroys the source
@ -329,78 +352,93 @@ Array by picking.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Insertion position.&]
[s7; [*C@3 x]-|Source Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]AppendPick[@(64) (pick`__][^`:`:Array^@(64) Array][@(64) `&_][@3 x
][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:AppendPick`(pick`_ Array`&`):%- [@(0.0.255) void]_[* AppendPick]([@(0.128.128) p
ick`_]_[_^Array^ Array][@(0.0.255) `&]_[*@3 x])&]
[s2; Appends source Array using pick transfer semantics. It is faster
than deep copy insert, does not use deep copy constructor for
T, but destroys the source Array by picking.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|Source Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Swap[@(64) (][@(0.0.255) int][@(64) _][@3 i1][@(64) ,
][@(0.0.255) int][@(64) _][@3 i2][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Swap`(int`,int`):%- [@(0.0.255) void]_[* Swap]([@(0.0.255) int]_[*@3 i1],
[@(0.0.255) int]_[*@3 i2])&]
[s2; Swaps elements without using copy constructor.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i1]-|Position of the first element.&]
[s7; [*C@3 i2]-|Position of the second element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Move[@(64) (][@(0.0.255) int][@(64) _][@3 i1][@(64) ,
][@(0.0.255) int][@(64) _][@3 i2][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Move`(int`,int`):%- [@(0.0.255) void]_[* Move]([@(0.0.255) int]_[*@3 i1],
[@(0.0.255) int]_[*@3 i2])&]
[s2; Removes element at position [* i1] and inserts it at [* i2], without
using copy constructor of T.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i1]-|Position of the element to move.&]
[s7; [*C@3 i2]-|Target position.&]
[s0;3 &]
[s5;K%- T_`*Detach[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Detach`(int`):%- [*@4 T]_`*[* Detach]([@(0.0.255) int]_[*@3 i])&]
[s2; Removes the element at position [* i], giving up ownership. Client
is responsible for deletion of the element.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Position of the element to remove.&]
[s7; [*/ Return value]-|Pointer to the element allocated on the heap.&]
[s0;3 &]
[s5;K%- T`&_Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) , T_`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Set`(int`,T`*`):%- [*@4 T][@(0.0.255) `&]_[* Set]([@(0.0.255) int]_[*@3 i],
[*@4 T]_`*[*@3 newt])&]
[s2; Replaces element at the specified position by an element previously
created on the heap. Array takes over ownership of the element.&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 newt]-|New element allocated on the heap.&]
[s7; [*/ Return value]-|Reference to new element.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Insert[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@4 T][@(64) _`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Insert`(int`,T`*`):%- [@(0.0.255) void]_[* Insert]([@(0.0.255) int]_[*@3 i],
[*@4 T]_`*[*@3 newt])&]
[s2; Inserts an element previously created on the heap at the specified
position. Array takes over ownership of element.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 i]-|Insertion position.&]
[s7; [*C@3 newt]-|New element allocated on the heap.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Drop[@(64) (][@(0.0.255) int][@(64) _][@3 n][@(64) _`=_][@3 1][@(64) )
]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Drop`(int`):%- [@(0.0.255) void]_[* Drop]([@(0.0.255) int]_[*@3 n]_`=_[@3 1])&]
[s2; Drops specified number of last elements in the Array (same as
Trim(GetCount() `- n)).&]
[s7; [C@3 n][* -|Number of elements.]&]
[s0;3 &]
[s5;K%- T`&_Top[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Top`(`):%- [*@4 T][@(0.0.255) `&]_[* Top]()&]
[s2; Returns reference to the last element in the Array.&]
[s7; [*/ Return value]-|Reference of last element in the Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) const][@(64) _T`&_]Top[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Top`(`)const:%- [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[* Top]()_[@(0.0.255) c
onst]&]
[s2; Returns constant reference to the last element in the Array.&]
[s7; [*/ Return value]-|Reference of last element in the Array.&]
[s0;3 &]
[s5;K%- T_`*PopDetach[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:PopDetach`(`):%- [*@4 T]_`*[* PopDetach]()&]
[s2; Drops the last element in the Array, giving up ownership (same
as Detach(GetCount() `- 1)). Client is responsible for deletion
of element.&]
[s0; Invalidates iterators to the Array.&]
[s7; [*/ Return value]-|Pointer to element allocated on the heap.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Swap[@(64) (][^`:`:Array^@(64) Array][@(64) `&_][@3 b][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Swap`(Array`&`):%- [@(0.0.255) void]_[* Swap]([_^Array^ Array][@(0.0.255) `&]_[*@3 b
])&]
[s2; Swaps content of Array with another array in constant time operation.&]
[s7; [*C@3 b]-|Target array.&]
[s0;3 &]
[s5;K%- [^`:`:Array^ Array]`&_operator<<[@(64) (][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`<`<`(const T`&`):%- [_^Array^ Array][@(0.0.255) `&]_[* operator<<]([@(0.0.255) c
onst]_[*@4 T][@(0.0.255) `&]_[*@3 x])&]
[s2; Operator replacement of [* void Add(const T`&x)]. By returning
a reference to the Array it allows adding more elements in a
single expression, thus e.g. allowing to construct a temporary
@ -410,8 +448,10 @@ Array as part of an expression like Foo((Array<int>() << 1 <<
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|The value that is copied to newly created element.&]
[s7; [*/ Return value]-|Reference to the Array (`*this).&]
[s0;3 &]
[s5;K%- [^`:`:Array^ Array]`&_operator<<[@(64) (T_`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`<`<`(T`*`):%- [_^Array^ Array][@(0.0.255) `&]_[* operator<<]([*@4 T]_`*
[*@3 newt])&]
[s2; Operator replacement of [* void Add(T `*x)]. By returning a reference
to the Array it allows adding more elements in a single expression,
thus e.g. allowing to construct a temporary Array as part of
@ -419,9 +459,10 @@ an expression like Foo((Array<Bar>() << new Bar << new DerivedFromBar)).&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 newt]-|Object to be added.&]
[s7; [*/ Return value]-|Reference to the Array (`*this).&]
[s0; &]
[s0;:Array`& operator`|`(pick`_ T`& x`): Array`& [* operator`|](pick`_
T`& [*@3 x])&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`|`(pick`_ T`&`):%- [_^Array^ Array][@(0.0.255) `&]_[* operator`|]([@(0.128.128) p
ick`_]_[*@4 T][@(0.0.255) `&]_[*@3 x])&]
[s2; Operator replacement of [* void AddPick(pick`_ T`&x)]. By returning
a reference to the Array it allows adding more elements in a
single expression, thus e.g. allowing to construct a temporary
@ -430,111 +471,120 @@ Array as part of an expression.&]
[s6; Invalidates iterators to the Array.&]
[s7; [*C@3 x]-|Source instance of T that is to be picked.&]
[s7; [*/ Return value]-|Reference to Array (`*this).&]
[s0;3 &]
[s5;K%- [@(0.0.255) bool][@(64) _]IsPicked[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:IsPicked`(`)const:%- [@(0.0.255) bool]_[* IsPicked]()_[@(0.0.255) const]&]
[s2; Returns [* true] if the Array is in picked state.&]
[s7; [*/ Return value]-|[* true] if the Array is in picked state, [* false]
otherwise.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Serialize[@(64) (][^`:`:Stream^@(64) Stream][@(64) `&_][@3 s][@(64) )
]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Serialize`(Stream`&`):%- [@(0.0.255) void]_[* Serialize]([_^Stream^ Stream][@(0.0.255) `&
]_[*@3 s])&]
[s2; Serializes the content of the Array to/from the Stream. Works
only if NTL is used as part of UPP. Does not work with polymorphic
Arrays (those storing objects derived from T).&]
[s6; Requires T to have serialization operator defined.&]
[s7; [*C@3 s]-|Target/source stream.&]
[s0;3 &]
[s0;:`:`:Array`:`:Array`(`): [* Array]()&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Array`(`):%- [* Array]()&]
[s2; Default constructor. Constructs an empty Array.&]
[s0;3 &]
[s0;:`:`:Array`:`:`~Array`(`): `~[* Array]()&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:`~Array`(`):%- [@(0.0.255) `~][* Array]()&]
[s2; Destructor. Invokes the destructor of every element in the Array.&]
[s0;3 &]
[s0;:`:`:Array`:`:Array`(pick`_`:`:Array`&`): [* Array](pick`_ Array`&
[*@3 v])&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Array`(pick`_ Array`&`):%- [* Array]([@(0.128.128) pick`_]_[* Array][@(0.0.255) `&
]_[*@3 v])&]
[s2; Pick constructor. Transfers the source Array in low constant
time, but destroys it by picking. &]
[s7; [*C@3 v]-|Source Array.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]operator`=[@(64) (pick`__][^`:`:Array^@(64) Array][@(64) `&_][@3 v
][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:operator`=`(pick`_ Array`&`):%- [@(0.0.255) void]_[* operator`=]([@(0.128.128) p
ick`_]_[_^Array^ Array][@(0.0.255) `&]_[*@3 v])&]
[s2; Pick operator. Transfers the source Array in low constant time,
but destroys it by picking.&]
[s7; [*C@3 v]-|Source Array.&]
[s0;3 &]
[s0;:`:`:Array`:`:Array`(const`:`:Array`&`,int`): [* Array](const Array`&
[*@3 v], int)&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Array`(const Array`&`,int`):%- [* Array]([@(0.0.255) const]_[* Array][@(0.0.255) `&
]_[*@3 v], [@(0.0.255) int])&]
[s2; Optional deep copy constructor.&]
[s6; Requires T to have deep copy constructor or optional deep copy
constructor if the Array stores only objects of type T.&]
[s6; Requires polymorphic deep copy if the Array stores also objects
of type derived from T.&]
[s7; [*C@3 v]-|Source Array.&]
[s0;3 &]
[s5;K%- friend_T`&_operator<<`=[@(64) (T`&_][@3 dest][@(64) , ][@(0.0.255) const][@(64) _T`&_][@3 s
rc][@(64) )]&]
[s2; Optional deep copy operator. Defined using DeepCopyOption base
class.&]
[s6; Requires T to have deep copy constructor or optional deep copy
if the Array stores only objects of type T.&]
[s6; Requires polymorphic deep copy if the Array stores also objects
of type derived from T.&]
[s7; [*C@3 v]-|Source Array.&]
[s0;3 &]
[s5;K%- typedef_T_ValueType&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:ValueType`:`:typedef:%- [@(0.0.255) typedef]_T_[* ValueType]&]
[s2; Typedef of T for use in templated algorithms.&]
[s0;3 &]
[s5;K%- [@(0.0.255) class][@(64) _]Iterator[@(64) _:_][@(0.0.255) public][@(64) _][^`:`:Array`:`:ConstIterator^@(64) C
[s3;%- &]
[s4;%- &]
[s1;:Array`:`:Iterator`:`:class:%- [@(0.0.255) class]_[* Iterator]_:_[@(0.0.255) public]_[*@3 C
onstIterator]&]
[s2; Iterator type.&]
[s0;3 &]
[s5;K%- [@(0.0.255) class][@(64) _]ConstIterator&]
[s3;%- &]
[s4;%- &]
[s5;%- [@(0.0.255) class][@(64) _]ConstIterator&]
[s2; Constant iterator type.&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:Iterator^ Iterator]_Begin[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Begin`(`):%- [_^Array`:`:Iterator^ Iterator]_[* Begin]()&]
[s2; Returns a non`-constant iterator to the first element in the
Array. &]
[s7; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:Iterator^ Iterator]_End[@(64) ()]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:End`(`):%- [_^Array`:`:Iterator^ Iterator]_[* End]()&]
[s2; Returns a non`-constant iterator to the position just beyond
the last element in Array.&]
[s7; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:Iterator^ Iterator]_GetIter[@(64) (][@(0.0.255) int][@(64) _][@3 pos][@(64) )
]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:GetIter`(int`):%- [_^Array`:`:Iterator^ Iterator]_[* GetIter]([@(0.0.255) int
]_[*@3 pos])&]
[s2; Returns a non`-constant iterator to the element at the specified
position. Same as [* Begin() `+ pos]. The benefit of this method
is that [* pos] is range checked in debug mode.&]
[s7; [*C@3 pos]-|Required position.&]
[s7; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:ConstIterator^ ConstIterator]_Begin[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:Begin`(`)const:%- [_^Array`:`:ConstIterator^ ConstIterator]_[* Begin]()_[@(0.0.255) c
onst]&]
[s2; Returns a constant iterator to the first element in Array. &]
[s7; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:ConstIterator^ ConstIterator]_End[@(64) ()_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:End`(`)const:%- [_^Array`:`:ConstIterator^ ConstIterator]_[* End]()_[@(0.0.255) c
onst]&]
[s2; Returns a constant iterator to the position just beyond the
last element in Array.&]
[s7; [*/ Return value]-|Iterator.-|&]
[s0;3 &]
[s5;K%- [^`:`:Array`:`:ConstIterator^ ConstIterator]_GetIter[@(64) (][@(0.0.255) int][@(64) _
][@3 pos][@(64) )_][@(0.0.255) const]&]
[s3;%- &]
[s4;%- &]
[s5;:Array`:`:GetIter`(int`)const:%- [_^Array`:`:ConstIterator^ ConstIterator]_[* GetIter
]([@(0.0.255) int]_[*@3 pos])_[@(0.0.255) const]&]
[s2; Returns a constant iterator to the element at the specified
position. Same as [* Begin() `+ pos]. The benefit of this method
is that [* pos] is range checked in debug mode..&]
[s7; [*C@3 pos]-|Required position.&]
[s7; [*/ Return value]-|Iterator.&]
[s0;3 &]
[s5;K%- friend_[@(0.0.255) void][@(64) _]Swap[@(64) (][^`:`:Array^@(64) Array][@(64) `&_][@3 a][@(64) ,
][^`:`:Array^@(64) Array][@(64) `&_][@3 b][@(64) )]&]
[s3; &]
[s4;%- &]
[s5;%- friend_[@(0.0.255) void][@(64) _]Swap[@(64) (][_^`:`:Array^ Array][@(64) `&_][@3 a][@(64) ,
][_^`:`:Array^ Array][@(64) `&_][@3 b][@(64) )]&]
[s2; Specialization of the generic [* Swap] for Array. Swaps the arrays
in simple constant time operation.&]
[s7; [*C@3 a]-|First Array to swap.&]
[s7; [*C@3 b]-|Second Array to swap.&]
[s0;3 &]
[s5;K%- friend_[@(0.0.255) void][@(64) _]IterSwap[@(64) (][^`:`:Array`:`:Iterator^@(64) Itera
tor][@(64) _][@3 a][@(64) , ][^`:`:Array`:`:Iterator^@(64) Iterator][@(64) _][@3 b][@(64) )]&]
[s4;%- &]
[s5;%- friend_[@(0.0.255) void][@(64) _]IterSwap[@(64) (][_^`:`:Array`:`:Iterator^ Iterator][@(64) _
][@3 a][@(64) , ][_^`:`:Array`:`:Iterator^ Iterator][@(64) _][@3 b][@(64) )]&]
[s2; Specialization of the generic [* IterSwap] for Array. Swaps the
elements in an Array without any requirements for T.&]
[s7; [*C@3 a]-|Iterator to first element.&]

View file

@ -10,49 +10,31 @@ topic "ArrayIndex";
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}%EN-US
[s5;K%- template_<[@(0.0.255) class][@(64) _][@4 T][@(64) , ][@(0.0.255) class][@(64) _][@4 HashFn][@(64) _
`=_StdHash<][@4 T][@(64) >_>__][@(0.0.255) class][@(64) _]ArrayIndex[@(64) _:_][@(0.0.255) pri
vate][@(64) _][^`:`:MoveableAndDeepCopyOption^@(64) MoveableAndDeepCopyOption][@(64) <_
]ArrayIndex[@(64) <][@4 T][@(64) , ][@4 HashFn][@(64) _>_>, ][@(0.0.255) public][@(64) _][^`:`:AIndex^@(64) A
Index][@(64) <][@4 T][@(64) , ][^`:`:Array^@(64) Array][@(64) <][@4 T][@(64) >,
][@4 HashFn][@(64) >_]&]
[s0;~~~64; template <class [*@4 T], class [*@4 HashFn] `= StdHash<[*@4 T]>
>&]
[s0;3 &]
[s5;K%- template_<[@(0.0.255) class][@(64) _][@4 T][@(64) , ][@(0.0.255) class][@(64) _][@4 HashFn][@(64) _
`=_StdHash<][@4 T][@(64) >_>__][@(0.0.255) class][@(64) _]ArrayIndex[@(64) _:_][@(0.0.255) pri
vate][@(64) _][^`:`:MoveableAndDeepCopyOption^@(64) MoveableAndDeepCopyOption][@(64) <_
]ArrayIndex[@(64) <][@4 T][@(64) , ][@4 HashFn][@(64) _>_>, ][@(0.0.255) public][@(64) _][^`:`:AIndex^@(64) A
Index][@(64) <][@4 T][@(64) , ][^`:`:Array^@(64) Array][@(64) <][@4 T][@(64) >,
][@4 HashFn][@(64) >_]&]
[s0; &]
[s0;i480;~~~.480; [*C@4 T]-|Type or base class of elements stored in
Array. There is no common requirement for T.&]
[s0;i480;~~~.480; [*C@4 HashFn]-|Hashing class. Must have defined [*C unsigned
operator()(const T`& x)] method returning hash value for elements.
Defaults to[* ][*C StdHash<T>] which requires [*C unsigned GetHashValue(const
T`&)][C ]function returning hash value of elements to be defined.&]
[s0; Base class&]
[s0; [^topic`:`/`/Core`/src`/AIndex`$en`-us^ AIndex<T, Array<T>, HashFn>]&]
[s0; &]
[s0; Array flavor of index. Inherits most of its functionality from
[s1;:noref:%- [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T], [@(0.0.255) class]_[*@4 HashFn
]_`=_StdHash[@(0.0.255) <][*@4 T][@(0.0.255) >]_>&]
[s1;:ArrayIndex`:`:class:%- [@(0.0.255) class]_[* ArrayIndex]_:_[@(0.0.255) private]_[*@3 Move
ableAndDeepCopyOption][@(0.0.255) <]_[* ArrayIndex][@(0.0.255) <][*@4 T],
[*@4 HashFn]_>_>, [@(0.0.255) public]_[*@3 AIndex][@(0.0.255) <][*@4 T],
[_^Array^ Array][@(0.0.255) <][*@4 T][@(0.0.255) >], [*@4 HashFn][@(0.0.255) >]_&]
[s8; [*@4 T]-|Type or base class of elements stored in Array. There
is no common requirement for T.&]
[s8; [*@4 HashFn]-|Hashing class. Must have defined unsigned operator()(const
T`& x) method returning hash value for elements. Defaults to
StdHash<T> which requires unsigned GetHashValue(const T`&) function
returning hash value of elements to be defined.&]
[s9; Array flavor of index. Inherits most of its functionality from
[^topic`:`/`/Core`/src`/AIndex`$en`-us^ AIndex] and adds only members
specific for its flavor.&]
[s0; Like any other NTL container, ArrayIndex is a [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
[s9; Like any other NTL container, ArrayIndex is a [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
oveable][*/ ]type with [*/^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ pick
and optional deep copy] transfer semantics. Calling methods of
a picked ArrayIndex is logic error with the exceptions of&]
[s0; [C+75 void ][*C+75 operator`=][C+75 (pick`_ ArrayIndex`& ][*C@3+75 v][C+75 )
][/+75 (defined by composition)]&]
[s0; [C+75 void ][*C+75 operator<<`=][C+75 (const AIndex`& ][*C@3+75 v][C+75 )][+75
][/+75 (defined in AIndex)]&]
[s0; [C+75 void ][*C+75 Clear][C+75 ()]&]
[s0; [C+75 bool ][*C+75 IsPicked][C+75 () const]&]
[s0; Optional deep copy operator is inherited from AIndex class.
Pick operator is implicitly defined by composition.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Add[@(64) (][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) ,
][@(0.0.255) unsigned][@(64) _][@3 `_hash][@(64) )]&]
and optional deep copy] transfer semantics. Optional deep copy
operator is inherited from AIndex class. Pick operator is implicitly
defined by composition.&]
[s3;%- &]
[ {{10000F(128)G(128)@1 [s0; [* Public Member List]]}}&]
[s4;H0;%- &]
[s5;:ArrayIndex`:`:Add`(const T`&`,unsigned`):%- [@(0.0.255) void]_[* Add]([@(0.0.255) cons
t]_[*@4 T][@(0.0.255) `&]_[*@3 x], [@(0.0.255) unsigned]_[*@3 `_hash])&]
[s2; Adds a new element with a precomputed hash value. The precomputed
hash value must be the same as the hash value that would be the
result of HashFn. The benefit of using a precomputed hash value
@ -64,18 +46,21 @@ forwarding) due to overloading of [* Add] in other forms.&]
[s6; Invalidates iterators to the ArrayIndex.&]
[s7; [*C@3 x]-|Element to add.&]
[s7; [*C@3 `_hash]-|Precomputed hash value.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Add[@(64) (][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Add`(const T`&`):%- [@(0.0.255) void]_[* Add]([@(0.0.255) const]_[*@4 T][@(0.0.255) `&
]_[*@3 x])&]
[s2; Adds a new element to Index. This method has to be reimplemented
in ArrayIndex (using simple forwarding) due to overloading of
[* Add] in other forms.&]
[s6; Requires T to have deep copy constructor.&]
[s6; Invalidates iterators to the ArrayIndex.&]
[s7; [*C@3 x]-|Element to add.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) , ][@(0.0.255) unsigned][@(64) _][@3 `_hash][@(64) )
]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Set`(int`,const T`&`,unsigned`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) i
nt]_[*@3 i], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x], [@(0.0.255) unsigned]_[*@3 `_ha
sh])&]
[s2; Replaces the element at the specified position with a new element
with the specified value, using a precomputed hash`-value. Speed
of this operation depends on the total number of elements with
@ -87,9 +72,10 @@ due to overloading of [* Set] in other forms.&]
[s7; [*C@3 i]-|Position of element.&]
[s7; [*C@3 x]-|Value to set.&]
[s7; [*C@3 `_hash]-|Precomputed hash value.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@(0.0.255) const][@(64) _T`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Set`(int`,const T`&`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) int]_[*@3 i
], [@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[*@3 x])&]
[s2; Replaces element at specified position with new element with
specified value. Speed of this operation depends on the total
number of elements with the same value as the specified one in
@ -100,9 +86,10 @@ forms.&]
[s6; Invalidates iterators to the ArrayIndex.&]
[s7; [*C@3 i]-|Position of element.&]
[s7; [*C@3 x]-|Value to set.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Add[@(64) (][@4 T][@(64) _`*][@3 newt][@(64) ,
][@(0.0.255) unsigned][@(64) _][@3 `_hash][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Add`(T`*`,unsigned`):%- [@(0.0.255) void]_[* Add]([*@4 T]_`*[*@3 newt],
[@(0.0.255) unsigned]_[*@3 `_hash])&]
[s2; Adds a new element created on the heap to the ArrayIndex using
a precomputed hash value. The element is specified by a pointer
to the object. ArrayIndex takes over ownership of the pointed
@ -110,8 +97,9 @@ element. This variant allows the use of an ArrayIndex as a polymorphic
container, because the type of the added element can be either
T or a type derived from T. No constructor is applied. &]
[s7; [*C@3 newt]-|Element created on the heap.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Add[@(64) (][@4 T][@(64) _`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Add`(T`*`):%- [@(0.0.255) void]_[* Add]([*@4 T]_`*[*@3 newt])&]
[s2; Adds a new element to the ArrayIndex. The element is specified
by a pointer to the object. ArrayIndex takes over ownership of
the pointed element. This variant allows the use of an ArrayIndex
@ -119,55 +107,63 @@ as a polymorphic container, because the type of the added element
can be either T or a type derived from T. No constructor is applied.
&]
[s7; [*C@3 newt]-|Object to be added.&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@4 T][@(64) _`*][@3 newt][@(64) , ][@(0.0.255) unsigned][@(64) _][@3 `_hash][@(64) )]&]
[s2; &]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Set`(int`,T`*`,unsigned`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) int]_
[*@3 i], [*@4 T]_`*[*@3 newt], [@(0.0.255) unsigned]_[*@3 `_hash])&]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 newt]-|New element created on heap.&]
[s7; [*C@3 `_hash]-|Hash value&]
[s0;3 &]
[s5;K%- [@(0.0.255) void][@(64) _]Set[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) ,
][@4 T][@(64) _`*][@3 newt][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:Set`(int`,T`*`):%- [@(0.0.255) void]_[* Set]([@(0.0.255) int]_[*@3 i],
[*@4 T]_`*[*@3 newt])&]
[s2; Replaces the element at the specified position by an element
previously created on the heap. ArrayIndex takes over ownership
of the element.&]
[s0; &]
[s7; [*C@3 i]-|Position.&]
[s7; [*C@3 newt]-|New element created on heap.&]
[s7; [*/ Return value]-|&]
[s0;3 &]
[s0;:`:`:ArrayIndex`:`:ArrayIndex`(`): [* ArrayIndex]()&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:ArrayIndex`(`):%- [* ArrayIndex]()&]
[s2; Constructor. Constructs an empty ArrayIndex.&]
[s0;3 &]
[s0;:`:`:ArrayIndex`:`:ArrayIndex`(pick`_`:`:ArrayIndex`&`): [* ArrayIndex](pick`_
[* ArrayIndex]`& [*@3 s])&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:ArrayIndex`(pick`_ ArrayIndex`&`):%- [* ArrayIndex]([@(0.128.128) pick
`_]_[* ArrayIndex][@(0.0.255) `&]_[*@3 s])&]
[s2; Pick constructor. Transfers source Index in low constant time,
but destroys it by picking.&]
[s7; [*C@3 s]-|Source ArrayIndex.&]
[s0;3 &]
[s0;:`:`:ArrayIndex`:`:ArrayIndex`(const`:`:ArrayIndex`&`,int`): [* ArrayIndex](const
[* ArrayIndex]`& [*@3 s], int)&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:ArrayIndex`(const ArrayIndex`&`,int`):%- [* ArrayIndex]([@(0.0.255) co
nst]_[* ArrayIndex][@(0.0.255) `&]_[*@3 s], [@(0.0.255) int])&]
[s2; Optional deep copy constructor.&]
[s6; Requires T to have deep copy constructor or optional deep copy
constructor.&]
[s7; [*C@3 s]-|Source ArrayIndex.&]
[s0;3 &]
[s0;:`:`:ArrayIndex`:`:ArrayIndex`(pick`_`:`:Array`<T`>`&`): [* ArrayIndex](pick`_
[* Array]<T>`& [*@3 s])&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:ArrayIndex`(pick`_ Array`<T`>`&`):%- [* ArrayIndex]([@(0.128.128) pick
`_]_[_^Array^ Array][@(0.0.255) <][*@4 T][@(0.0.255) >`&]_[*@3 s])&]
[s2; Pick`-constructs ArrayIndex from an Array. Transfers source
container in low constant time, but destroys it by picking.&]
[s7; [*C@3 s]-|Source Array.&]
[s0;3 &]
[s0;:`:`:ArrayIndex`:`:ArrayIndex`(const`:`:Array`<T`>`&`,int`): [* ArrayIndex](const
[* Array]<T>`& [*@3 s], int)&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:ArrayIndex`(const Array`<T`>`&`,int`):%- [* ArrayIndex]([@(0.0.255) co
nst]_[_^Array^ Array][@(0.0.255) <][*@4 T][@(0.0.255) >`&]_[*@3 s], [@(0.0.255) int])&]
[s2; Deep`-copy constructs ArrayIndex from Array.&]
[s6; Requires T to have deep copy constructor or optional deep copy
constructor.&]
[s7; [*C@3 s]-|Source Vector.&]
[s0;3 &]
[s5;K%- [^`:`:ArrayIndex^ ArrayIndex]`&_operator`=[@(64) (pick`__][^`:`:Array^@(64) Array][@(64) <
][^T^@(64) T][@(64) >`&_][@3 x][@(64) )]&]
[s3;%- &]
[s4;%- &]
[s5;:ArrayIndex`:`:operator`=`(pick`_ Array`<T`>`&`):%- [_^ArrayIndex^ ArrayIndex][@(0.0.255) `&
]_[* operator`=]([@(0.128.128) pick`_]_[_^Array^ Array][@(0.0.255) <][*@4 T][@(0.0.255) >`&]_
[*@3 x])&]
[s2; Pick operator. Transfers source Array to the ArrayIndex, but
destroys it by picking.&]
[s0; [*C@3 x]-|Source Array.]
[s7; [*C@3 x]-|Source Array.&]
[s0; ]

View file

@ -184,24 +184,24 @@ a part of interface definition:&]
[s0;%- Protected members for Stream implementation&]
[s0; &]
[s5;K%- [^`:`:int64^ int64]_pos&]
[s0;%- Protected.&]
[s6;%- Protected.&]
[s2; Position of buffer in the stream.&]
[s0;3 &]
[s5;K%- [^`:`:byte^ byte]_`*buffer&]
[s0; Protected.&]
[s6; Protected.&]
[s2; Pointer to beginning of buffer.&]
[s0;3 &]
[s5;K%- [^`:`:byte^ byte]_`*ptr&]
[s0; Protected.&]
[s6; Protected.&]
[s2; Pointer to current input/output byte.&]
[s0;3 &]
[s5;K%- [^`:`:byte^ byte]_`*rdlim&]
[s0; Protected.&]
[s6; Protected.&]
[s2; Read limit. [* Get] method returns values from buffer as long
as [* ptr < rdlim].&]
[s0;3 &]
[s5;K%- [^`:`:byte^ byte]_`*wrlim&]
[s0; Protected.&]
[s6; Protected.&]
[s2; Write limit. [* Put] method returns values from buffer as long
as [* ptr < wrlim].&]
[s0;3 &]

View file

@ -32,7 +32,7 @@ oid]_[* IterSwap]([*@4 I]_[*@3 a], [*@4 I]_[*@3 b])&]
[s7; [*C@4 I]-|Iterator type.&]
[s7; [*C@3 a]-|Iterator pointing to first value.&]
[s7; [*C@3 b]-|Iterator pointing to second value. xx&]
[s3;%- yy&]
[s3;%- &]
[s4;%- &]
[s5;:IterSwap`(I`,I`):%- [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 I][@(0.0.255) >]_[@(0.0.255) v
oid]_[* IterSwap]([*@4 I]_[*@3 a], [*@4 I]_[*@3 b])&]
@ -42,8 +42,8 @@ oid]_[* IterSwap]([*@4 I]_[*@3 a], [*@4 I]_[*@3 b])&]
[s7; [*C@4 I]-|Iterator type.&]
[s7; [*C@3 a]-|Iterator pointing to first value.&]
[s7; [*C@3 b]-|Iterator pointing to second value. xx&]
[s3;%- yy&]
[s0; &]
[s3;%- &]
[s4; &]
[s5;:FindLowerBound`(const C`&`,int`,int`,const T`&`,const L`&`):%- [@(0.0.255) templat
e]_<[@(0.0.255) class]_[*@4 C], [@(0.0.255) class]_[*@4 T], [@(0.0.255) class]_[*@4 L][@(0.0.255) >
]_[@(0.0.255) int]_[* FindLowerBound]([@(0.0.255) const]_[*@4 C][@(0.0.255) `&]_[*@3 v],

View file

@ -176,7 +176,7 @@ public:
void SetRoot(const Node& n);
void SetRoot(const Image& img, Value v);
void SetRoot(const Image& img, Value v, Value t);
void SetRoot(const Image& img, Value key, Value text);
void SetRoot(const Image& img, Ctrl& ctrl, int cx = 0, int cy = 0);
int Insert(int parentid, int i, const Node& n);
int Insert(int parentid, int i);
@ -196,7 +196,7 @@ public:
int GetChildCount(int id) const { return item[id].child.GetCount(); }
int GetChild(int id, int i) const { return item[id].child[i]; }
int GetChildIndex(int id, int childid) const;
int GetChildIndex(int parentid, int childid) const;
int GetParent(int id) const { return item[id].parent; }
Value Get(int id) const;

View file

@ -1,29 +1,672 @@
TITLE("TreeCtrl")
COMPRESSED
120,156,237,61,249,87,19,105,182,255,74,157,211,111,122,208,71,211,73,8,139,250,222,156,238,209,153,62,158,233,233,158,51,206,242,131,71,155,144,20,80,175,67,194,164,2,202,188,243,230,160,136,44,17,21,12,81,1,69,3,200,26,246,125,85,33,178,137,200,190,42,139,108,97,21,89,101,125,223,87,85,73,170,66,66,86,108,237,233,110,15,132,170,239,222,239,110,223,189,247,187,223,146,179,28,228,63,254,131,229,204,250,140,101,230,191,227,167,80,31,94,160,80,122,238,44,198,229,122,158,224,113,220,78,252,248,135,239,143,157,56,250,149,147,59,247,8,196,194,6,88,92,61,216,174,158,110,174,108,46,199,29,252,96,187,178,57,110,28,87,46,219,147,115,140,235,233,234,234,201,58,206,23,242,112,252,220,89,33,199,211,243,4,4,226,56,115,62,227,120,184,113,216,30,92,79,174,39,219,213,195,147,3,96,57,44,22,135,229,193,113,99,115,93,61,57,110,199,5,40,206,63,119,150,231,233,122,226,232,159,221,1,144,43,236,9,32,103,177,221,57,92,15,46,135,229,
202,226,112,65,87,108,79,79,46,219,195,205,211,245,152,187,251,113,62,47,64,138,137,69,84,95,24,155,205,97,159,240,102,123,156,0,52,255,235,95,255,114,97,115,89,36,5,92,128,140,205,226,2,82,217,224,25,139,203,241,96,187,29,99,29,115,243,100,123,178,92,1,114,55,15,150,219,241,0,158,132,231,111,154,117,55,179,172,123,176,142,99,82,20,160,56,250,159,108,182,7,0,113,119,118,255,140,205,245,0,140,122,186,114,221,60,61,88,160,115,14,135,227,234,202,97,187,114,142,29,227,184,185,187,121,28,247,67,121,2,84,2,88,224,178,221,9,98,61,156,61,62,115,115,115,227,130,246,92,174,155,135,39,151,227,10,116,195,117,229,2,81,112,217,199,220,184,199,220,56,199,69,40,46,69,5,94,95,144,98,35,217,215,17,14,233,134,152,60,157,61,63,115,231,186,31,99,3,233,115,143,121,112,89,199,220,217,30,174,80,120,108,32,118,119,87,46,231,152,155,14,19,165,181,255,253,225,255,126,245,187,239,190,248,235,25,228,44,238,122,2,249,139,4,69,79,
74,37,194,207,207,157,197,89,39,144,175,190,194,252,121,190,232,113,32,72,206,231,108,182,155,123,84,232,211,144,242,144,144,144,203,13,123,224,103,200,70,105,226,252,189,166,142,161,162,2,121,200,114,234,139,39,247,210,203,66,100,37,67,33,209,207,26,66,198,66,178,59,230,66,250,242,174,244,200,101,141,161,33,217,15,212,119,50,67,215,238,238,62,79,185,121,83,190,145,191,146,23,181,178,178,178,154,61,85,58,62,181,53,163,236,110,86,205,110,40,106,114,43,43,231,107,43,234,66,134,71,38,198,55,215,23,171,98,118,46,61,233,106,24,111,111,158,189,61,154,53,18,179,161,122,162,124,27,170,30,105,72,42,157,150,215,183,47,111,71,61,76,234,159,120,155,40,191,36,155,84,245,119,77,15,215,245,164,206,40,59,234,122,114,75,210,203,202,250,138,66,195,242,34,182,229,170,230,90,133,188,181,56,125,38,45,123,72,62,59,249,88,185,144,81,92,169,184,183,187,119,175,174,246,74,216,88,248,219,177,103,29,227,147,217,171,209,145,117,173,3,242,218,228,184,150,
250,186,119,229,138,140,234,219,225,219,37,37,225,171,211,13,202,216,233,219,239,250,11,83,66,100,13,41,27,189,237,67,19,89,213,3,121,195,74,89,230,76,95,151,74,177,213,171,216,104,123,84,46,235,152,108,158,171,140,79,202,41,141,90,10,137,108,76,155,29,223,174,157,8,75,174,91,46,122,27,90,161,30,9,151,61,110,107,86,42,194,74,83,70,215,71,214,98,54,0,39,133,217,187,106,77,103,209,228,240,19,117,66,90,94,73,117,226,200,171,203,138,214,234,187,111,218,151,158,151,171,91,90,223,102,231,212,201,22,202,6,174,183,247,103,191,217,27,233,27,74,145,247,40,38,238,39,149,47,191,206,123,52,158,155,156,93,93,181,81,166,104,106,79,82,174,141,198,164,189,141,150,43,110,101,38,15,22,149,134,103,167,196,79,238,106,94,230,228,61,156,27,223,88,186,156,28,214,93,176,189,210,145,243,112,116,79,25,177,51,171,170,223,189,175,106,72,184,158,51,62,91,54,190,167,136,156,208,12,183,22,71,119,36,60,173,40,13,215,108,62,202,234,158,95,84,
45,36,246,86,118,244,84,247,148,230,44,60,95,26,202,171,126,217,147,162,6,146,137,106,145,247,68,169,219,39,170,223,100,100,79,221,42,108,92,92,76,43,83,13,229,206,189,219,125,49,214,214,171,124,152,154,161,214,92,142,91,238,207,95,27,24,111,122,28,219,86,20,86,89,56,157,94,209,156,53,247,102,32,37,241,250,196,157,149,234,75,247,118,250,139,50,210,147,10,146,103,70,53,205,89,37,221,143,42,170,151,238,47,223,141,8,157,145,205,204,104,226,102,149,67,157,245,49,201,57,247,213,49,175,6,170,138,18,215,203,86,242,179,223,204,214,104,54,203,148,209,242,154,134,194,161,136,119,209,41,189,205,154,137,201,100,197,219,39,189,192,42,52,245,87,149,217,131,69,125,87,118,139,129,190,71,218,23,202,115,159,246,118,92,85,68,150,22,78,68,181,190,187,247,124,102,107,226,201,114,248,251,198,140,248,156,190,209,156,164,186,247,29,89,178,119,53,207,103,226,182,42,211,230,91,11,162,42,166,118,19,82,102,18,149,57,17,47,54,58,86,0,130,141,193,185,
142,236,170,198,142,120,121,103,95,74,93,114,85,245,106,95,155,50,175,170,116,93,214,113,187,189,92,173,12,203,152,236,75,201,188,150,149,144,22,166,9,111,15,75,169,238,109,147,215,101,102,84,100,228,62,212,148,104,6,154,115,179,242,246,74,20,247,54,155,98,222,46,110,14,206,151,111,205,39,134,54,87,132,203,212,113,179,113,9,189,195,13,183,139,166,86,59,90,91,213,195,227,41,119,30,246,189,31,127,214,157,147,181,178,149,213,27,171,76,221,237,74,207,110,221,232,234,207,109,138,142,235,172,124,80,182,221,242,40,115,252,78,89,233,222,68,202,203,129,222,176,193,234,126,121,229,205,222,149,185,198,213,233,161,248,87,99,241,221,253,101,207,50,47,105,214,42,212,171,138,249,166,165,129,162,184,244,168,200,167,169,21,87,91,84,173,249,105,113,106,101,113,71,247,171,164,214,238,254,206,226,233,188,161,161,215,79,227,203,99,243,239,150,151,149,151,135,189,220,172,185,25,158,183,146,220,219,95,159,210,45,123,58,86,188,52,123,83,182,51,115,171,187,105,170,122,
118,242,206,237,212,240,251,11,83,107,25,137,15,90,218,151,10,6,199,171,98,215,210,30,95,206,24,139,89,137,188,172,184,148,148,125,185,182,111,229,202,46,144,248,220,238,114,105,215,72,234,211,184,249,210,169,117,153,98,189,181,176,160,126,181,90,81,61,185,89,61,213,59,48,159,57,181,184,212,85,174,232,31,24,184,221,253,104,58,38,255,82,127,107,190,122,110,56,86,166,172,188,251,182,186,79,94,56,49,216,165,120,255,172,160,100,96,48,77,185,162,124,53,26,243,174,111,233,186,76,166,122,183,211,18,177,152,49,150,62,86,55,154,30,62,17,177,20,85,31,151,113,179,50,246,70,122,124,166,90,211,147,148,62,49,113,107,32,97,247,129,106,183,229,129,170,106,123,105,178,99,166,107,179,41,190,41,167,251,197,141,166,244,240,136,161,157,165,250,39,170,87,153,229,242,27,99,155,10,245,102,90,115,81,185,172,243,225,218,208,76,111,123,222,100,127,74,79,204,237,236,178,245,188,246,199,106,205,118,83,239,112,89,204,114,67,73,71,89,172,186,185,60,239,117,105,
247,208,235,18,133,102,46,65,243,176,224,89,115,162,188,33,85,209,180,60,216,245,226,121,65,223,123,165,98,226,238,187,252,251,139,55,107,71,211,234,54,91,247,90,90,167,183,219,151,42,95,40,203,111,213,204,21,165,47,100,151,14,222,47,218,46,45,107,78,127,86,19,183,250,190,45,191,68,93,175,217,84,20,93,213,68,133,70,77,181,116,165,85,76,104,228,133,141,115,123,121,170,225,154,165,130,155,147,138,212,144,241,152,142,170,103,59,37,133,242,208,238,119,9,169,47,203,6,230,195,107,83,123,106,163,86,11,243,215,139,170,10,198,71,47,111,231,110,189,138,125,181,92,95,21,85,18,38,187,251,248,6,208,192,139,236,39,99,185,77,37,209,138,75,33,80,27,243,170,138,250,212,165,237,162,30,245,251,213,204,213,241,231,61,201,15,39,213,133,143,214,171,59,229,169,91,171,178,149,215,213,235,217,117,115,141,202,228,107,197,173,175,138,214,174,77,220,237,205,47,88,175,27,105,31,123,51,213,95,249,84,89,171,233,172,80,78,116,60,168,109,109,189,59,216,254,
126,115,60,125,179,119,176,163,161,121,248,241,234,141,219,207,138,162,183,74,235,215,150,101,245,239,150,114,7,218,235,139,227,74,59,42,20,229,241,205,99,21,151,10,95,20,134,143,245,13,166,188,95,47,46,26,139,236,168,41,81,239,140,21,183,198,170,242,159,78,215,200,227,243,210,135,85,155,27,237,45,9,17,205,19,178,236,194,196,46,133,102,87,211,219,222,255,96,168,184,232,222,203,133,246,7,187,229,173,215,251,202,211,149,234,184,236,241,138,120,69,91,204,230,221,200,156,237,250,200,103,77,225,133,29,149,173,235,19,87,186,54,175,171,22,22,175,78,63,121,165,28,213,188,159,155,153,143,157,172,110,88,148,191,200,46,27,80,76,140,174,21,173,85,238,228,181,200,70,26,71,74,8,191,26,170,110,133,238,246,6,37,23,224,23,38,160,95,0,239,122,136,240,17,46,139,36,228,151,125,249,37,124,9,45,120,132,4,140,87,83,128,164,121,95,105,222,37,1,169,184,19,126,75,70,2,62,184,76,2,246,111,147,128,197,161,36,160,118,92,200,175,144,128,131,36,
57,35,143,72,172,73,143,73,114,242,10,72,114,148,179,36,57,143,175,144,228,212,166,147,228,56,140,143,135,4,214,24,117,249,155,171,79,158,71,37,170,43,23,239,213,44,247,84,38,21,95,79,45,191,179,126,125,245,213,163,221,168,213,200,177,43,137,157,155,179,207,194,122,218,7,30,134,76,183,151,173,95,139,149,213,14,85,151,47,15,87,87,109,71,79,188,121,93,247,184,184,101,39,61,182,85,147,48,159,80,91,18,21,117,105,237,106,147,178,189,48,255,197,194,212,240,253,233,165,133,237,182,254,252,71,213,53,163,73,97,29,149,165,187,11,113,113,153,151,35,20,209,9,201,115,107,83,53,229,49,234,172,220,249,234,187,53,85,27,75,219,115,181,197,203,171,91,17,75,9,17,245,123,91,215,52,205,185,139,175,119,139,187,35,100,211,241,170,29,249,252,11,101,201,210,155,206,229,222,186,59,221,91,229,245,93,239,182,203,198,158,239,188,24,123,62,23,55,219,91,219,184,55,127,255,206,235,59,157,242,215,149,203,229,205,221,41,178,248,156,29,185,74,53,211,94,
156,113,121,55,127,55,247,121,118,69,207,104,211,184,106,38,105,48,190,51,78,94,83,182,94,220,221,181,25,241,160,111,165,169,127,88,126,61,127,53,47,46,81,169,42,72,31,24,108,26,207,94,155,185,127,7,160,218,141,223,221,27,200,106,84,77,239,101,94,82,43,111,212,214,188,174,120,214,181,246,182,224,218,84,163,178,232,233,141,152,194,39,233,239,199,198,158,119,110,222,126,251,164,181,231,97,246,116,78,74,104,171,50,43,60,34,127,224,117,100,114,254,116,243,141,240,152,210,244,157,5,77,21,104,51,61,170,234,73,141,25,124,217,21,42,83,191,77,218,89,125,31,149,17,94,156,151,87,144,62,212,221,214,63,158,77,244,184,40,223,93,154,94,200,74,191,118,243,113,241,116,199,157,39,29,181,109,45,177,178,156,213,130,187,123,21,201,219,131,163,219,0,207,70,219,150,170,72,249,234,229,138,38,121,174,50,110,75,157,148,180,149,209,22,149,159,244,118,98,165,54,62,93,213,246,60,90,211,156,145,84,181,219,151,89,31,150,21,173,168,105,238,41,95,239,220,
153,88,175,157,142,121,213,93,153,211,147,54,215,185,153,220,123,171,118,64,29,22,210,170,84,135,79,37,191,185,39,111,47,89,186,187,208,87,179,184,16,125,63,57,99,53,114,99,172,190,115,115,69,115,43,189,167,29,106,60,178,179,109,101,176,182,115,111,45,122,78,147,149,126,243,193,212,76,76,123,73,125,154,166,65,245,48,103,176,81,25,18,213,252,84,22,161,172,24,144,141,95,171,28,93,108,76,31,9,233,160,50,68,234,151,54,111,68,252,48,84,194,147,240,253,130,17,127,158,8,164,142,254,168,72,138,96,56,226,205,195,81,1,34,22,33,152,72,138,250,162,18,4,19,32,162,64,127,111,84,130,187,32,191,227,241,253,16,145,88,128,130,183,136,20,160,66,156,96,102,125,4,241,227,225,8,72,83,197,124,140,7,146,86,58,108,160,8,251,71,32,138,248,136,37,136,212,15,37,128,92,144,147,126,152,80,64,32,194,17,177,15,2,113,32,60,9,138,136,37,190,60,17,246,79,128,1,226,19,129,103,18,94,176,139,158,232,0,137,56,8,35,128,2,0,245,
112,138,129,72,197,160,55,28,149,72,17,62,13,41,79,138,224,1,40,31,243,193,32,46,136,5,9,16,227,24,1,193,19,9,32,20,160,74,18,76,1,193,71,96,154,1,69,64,192,187,32,127,22,139,165,36,93,144,53,31,236,34,228,74,128,176,92,152,226,132,191,216,39,254,112,220,11,252,175,165,18,126,254,14,96,129,191,137,228,253,248,87,44,228,236,175,88,172,47,88,172,175,156,88,46,44,23,142,155,219,17,132,202,235,181,207,193,108,6,249,65,251,39,162,199,69,160,58,7,251,225,0,237,249,1,13,17,128,136,4,13,144,160,56,160,24,39,228,202,23,3,145,3,242,33,39,188,128,0,20,204,153,68,124,20,10,23,199,68,190,66,84,47,67,200,20,157,11,183,3,200,63,45,194,164,94,78,94,71,104,28,156,39,158,195,201,198,121,146,104,226,179,41,62,136,89,137,150,250,239,8,195,1,148,90,218,189,63,79,226,139,137,140,139,15,152,152,169,78,73,48,109,175,103,2,120,64,16,222,168,244,2,138,138,136,238,9,33,5,241,132,129,132,124,160,244,
160,76,156,129,245,17,31,188,126,141,35,23,48,129,47,42,117,65,168,137,55,14,13,134,99,41,217,63,162,193,134,2,251,27,236,141,18,24,241,217,20,237,0,86,75,248,105,104,125,224,111,23,82,237,224,159,8,216,164,0,195,3,132,188,96,84,96,41,53,4,163,54,211,67,64,51,40,34,158,88,218,57,69,173,137,17,32,22,225,166,148,72,80,121,138,132,166,232,164,254,50,0,240,58,170,163,149,234,76,75,45,213,30,9,132,14,13,232,15,12,111,48,161,167,232,103,104,246,187,191,126,251,173,51,114,193,15,3,222,205,31,229,137,112,228,140,84,160,5,199,136,38,222,40,129,199,82,190,113,224,196,12,101,126,6,60,163,88,129,31,77,73,28,130,234,108,23,124,134,54,74,26,43,112,80,60,3,194,3,133,66,196,235,11,194,27,251,1,159,199,7,206,219,153,214,154,64,6,57,16,160,82,84,226,143,137,128,36,188,131,181,130,242,250,226,55,223,160,82,192,42,236,198,137,128,58,2,7,1,31,50,67,188,251,35,38,34,222,129,225,230,67,141,9,194,147,
19,142,17,160,181,70,36,16,171,161,72,254,36,149,80,18,1,159,152,2,249,47,134,37,64,100,84,75,248,145,217,244,55,122,225,193,78,180,194,251,59,73,47,45,44,93,192,164,126,86,249,63,62,79,4,34,141,9,15,228,45,22,11,77,41,145,2,100,12,28,240,12,154,17,124,110,133,212,128,53,162,66,148,47,181,137,6,18,212,24,21,228,27,203,233,56,131,74,9,71,239,229,68,140,90,93,16,240,250,28,68,7,134,78,13,161,207,19,126,95,71,149,215,231,58,10,1,71,90,180,186,215,78,231,204,248,9,3,23,65,70,34,102,16,98,244,225,10,98,144,175,238,205,17,221,200,66,193,8,34,162,147,21,18,160,49,79,56,77,251,153,183,153,111,210,129,51,125,183,1,223,65,38,184,246,22,131,81,0,226,10,45,12,2,87,66,181,61,74,0,218,39,19,231,79,83,74,206,136,227,177,75,77,232,128,33,126,43,164,77,5,37,154,208,181,79,236,22,178,65,120,181,90,214,218,96,109,24,167,13,36,34,48,33,17,42,38,89,33,11,24,153,64,114,74,69,
86,123,217,167,135,100,61,239,250,192,205,136,217,8,157,35,252,159,38,88,130,193,215,10,126,136,71,78,218,104,103,191,66,233,129,210,128,35,34,156,50,34,169,129,150,188,126,224,211,95,50,249,162,146,99,11,57,59,201,19,125,15,66,158,151,19,140,85,118,241,68,97,58,208,66,233,1,145,161,37,111,253,83,175,255,254,65,42,1,185,14,131,41,42,98,35,62,66,158,175,21,172,157,33,226,168,99,152,35,113,217,203,222,62,182,200,80,111,21,99,70,159,59,209,248,3,4,51,120,113,210,245,74,165,167,164,171,144,4,242,165,98,137,125,189,238,203,55,14,10,47,251,232,58,220,116,226,48,66,134,145,176,253,53,142,99,190,96,86,2,39,175,206,182,197,14,155,101,251,111,35,237,15,20,254,15,95,151,142,215,147,125,86,123,152,60,30,166,117,126,204,214,227,64,153,26,77,56,76,202,206,178,244,193,120,242,160,37,222,186,252,193,82,207,69,227,195,25,19,73,201,31,31,129,175,178,65,98,70,141,137,86,240,100,68,126,254,69,70,102,67,123,195,178,17,97,
176,121,132,38,220,25,85,34,130,150,137,17,57,189,63,42,194,49,32,85,11,203,230,100,185,156,38,49,173,12,207,155,42,156,159,63,79,211,211,249,175,244,149,115,122,131,227,244,38,122,68,1,129,222,66,140,111,12,19,169,41,109,209,29,174,115,208,108,150,99,218,102,255,238,135,18,41,170,97,157,235,36,79,40,244,230,241,127,100,107,107,88,218,191,245,106,97,214,188,128,110,168,166,251,234,220,180,106,151,182,59,6,165,68,109,238,2,15,167,10,77,206,8,177,127,10,214,255,136,82,38,85,237,70,48,129,11,130,152,25,130,16,255,73,161,24,223,87,202,60,68,126,136,254,140,51,196,135,175,236,102,232,91,212,71,122,74,12,84,111,146,43,3,166,152,228,50,169,213,35,51,78,178,128,120,7,55,113,97,252,31,81,1,226,196,15,148,224,176,128,42,64,69,82,184,58,181,191,9,177,160,102,206,57,194,190,127,203,147,216,170,23,0,234,245,185,129,224,193,51,45,15,127,197,137,146,16,30,24,16,32,12,38,151,150,46,74,17,48,150,3,45,161,11,76,99,
28,32,89,128,69,75,206,73,82,102,224,31,57,149,129,139,120,112,85,142,239,199,19,249,66,161,98,34,190,48,80,128,137,124,145,63,96,66,33,217,220,34,17,146,77,29,64,45,137,200,128,96,11,104,4,211,165,0,9,202,231,89,80,137,165,132,66,242,239,24,1,147,184,244,243,69,35,194,181,134,66,48,225,132,203,166,180,224,188,47,110,51,114,12,189,39,14,18,99,2,35,177,136,40,99,64,148,54,71,237,253,83,112,195,149,85,227,225,88,95,100,96,78,167,233,75,173,98,31,68,162,91,37,102,86,80,69,231,92,144,223,195,181,25,1,138,6,0,128,128,96,216,154,209,0,250,174,0,84,226,35,150,248,219,34,89,70,218,67,230,190,31,86,178,246,229,67,70,179,95,75,138,215,68,201,222,96,222,196,208,132,11,179,146,173,93,165,34,171,222,112,237,202,170,212,217,34,193,255,92,117,0,215,162,109,214,31,227,141,181,58,180,79,43,7,205,2,62,122,173,252,108,103,10,180,210,49,181,160,206,147,210,135,237,247,34,144,107,72,80,31,84,130,194,157,43,
76,135,74,48,13,199,50,46,21,75,192,104,246,250,226,55,90,92,98,239,255,129,229,77,33,230,131,74,193,124,3,241,15,196,165,8,122,145,143,130,102,58,163,249,53,174,107,0,34,154,110,90,2,173,142,66,131,251,137,3,133,2,72,22,189,219,139,231,156,25,127,7,3,199,126,218,7,65,49,16,8,36,6,45,97,130,194,108,75,236,105,250,39,42,17,59,35,250,197,116,253,172,200,210,21,244,211,196,254,38,47,39,157,61,59,91,29,96,141,107,144,133,144,168,15,52,117,83,202,39,247,75,209,198,144,85,166,131,29,12,246,33,98,186,69,162,254,212,164,105,5,107,206,7,198,52,131,5,141,79,131,123,171,109,233,176,179,24,198,27,163,212,153,92,209,129,155,85,196,244,229,46,232,98,125,120,66,28,117,152,142,127,81,247,199,154,48,125,60,166,178,47,153,250,197,84,28,146,197,125,66,41,156,149,198,40,54,101,134,32,9,212,190,33,45,2,167,182,95,107,103,208,212,22,108,253,206,109,239,96,162,172,119,10,195,165,152,8,36,121,65,60,9,198,131,91,
158,113,148,252,67,28,8,247,122,75,37,152,119,160,20,37,182,68,26,228,2,196,246,114,160,101,208,27,85,91,115,57,103,38,221,250,90,32,160,134,133,195,210,44,128,242,16,173,255,167,74,150,116,130,250,105,100,97,1,97,142,78,113,126,58,61,254,204,18,21,11,53,244,139,178,62,245,52,195,156,162,29,145,94,124,170,138,254,185,149,122,28,107,77,7,103,11,60,41,81,139,71,69,2,24,225,133,32,65,128,191,73,141,194,106,143,190,41,238,130,252,137,204,43,96,249,232,167,77,45,254,140,250,139,131,208,3,130,166,201,162,36,9,105,147,153,239,11,153,64,178,36,58,156,90,168,132,199,34,168,38,71,73,0,196,71,34,246,215,31,216,179,136,45,226,80,159,4,238,244,180,149,61,45,6,135,179,201,19,10,233,22,65,114,71,101,155,166,68,96,142,233,111,80,41,65,239,73,113,160,136,154,71,29,33,124,197,113,26,177,90,138,76,159,86,3,204,51,48,49,155,233,4,112,16,6,58,239,228,187,35,250,165,62,210,125,233,228,33,13,148,136,200,101,44,242,
80,39,52,98,186,100,116,131,200,110,185,208,139,104,246,201,197,33,34,209,59,39,51,112,214,75,82,183,152,79,147,38,240,79,152,72,128,94,68,24,210,59,231,24,249,146,254,204,94,155,35,177,124,48,123,211,178,109,68,88,182,73,193,12,255,86,157,115,36,37,114,120,178,48,198,2,121,134,89,44,241,58,235,117,206,193,188,208,81,31,30,83,172,19,52,74,141,104,28,46,240,105,79,119,219,166,98,50,247,119,184,158,141,180,56,68,195,215,173,111,218,42,136,51,90,91,183,103,161,217,222,152,234,200,5,96,189,84,224,250,175,157,102,98,76,58,159,146,160,14,107,149,221,161,66,6,131,230,91,76,132,82,185,142,117,211,51,58,172,94,184,58,98,191,209,237,171,9,148,144,55,48,232,18,19,33,0,195,225,249,230,32,12,199,188,133,40,149,163,144,7,158,181,228,89,64,58,60,248,250,53,65,132,13,245,42,6,188,109,198,177,95,67,58,166,49,129,254,2,12,41,193,48,130,89,168,140,175,9,186,108,227,72,15,239,176,92,91,199,18,193,196,65,182,6,87,
208,181,39,200,225,149,6,148,118,157,17,9,229,53,69,168,47,79,138,5,161,150,237,209,1,29,147,123,194,205,135,137,125,213,80,210,139,211,235,160,70,3,198,254,6,135,20,47,104,19,78,251,92,162,94,34,214,87,177,15,242,142,102,247,208,91,229,33,127,162,93,124,122,41,155,221,122,129,147,103,23,15,206,180,15,56,133,15,87,191,112,250,169,197,67,49,159,191,160,56,220,92,227,135,18,219,82,180,99,203,178,155,6,244,12,30,80,122,51,105,18,102,15,100,218,106,15,38,235,70,251,106,70,140,179,156,144,30,156,184,196,2,110,22,199,17,39,140,177,239,146,0,134,178,33,11,77,180,17,134,193,77,69,136,63,239,71,35,229,2,202,65,153,147,36,177,117,221,150,234,7,185,231,221,81,142,248,12,207,31,133,247,39,65,81,56,97,2,103,138,87,75,236,224,20,138,6,216,103,11,16,195,71,103,15,95,82,198,96,178,218,69,220,154,4,148,78,248,92,102,241,208,18,157,235,197,102,131,222,29,33,49,163,186,135,136,157,152,140,90,106,11,127,4,195,224,
111,164,209,219,194,23,13,220,97,156,145,3,27,42,137,86,63,57,48,74,194,146,45,28,207,160,129,165,35,24,158,154,39,118,230,155,201,21,15,138,144,122,4,142,74,22,201,131,220,212,193,17,145,174,42,171,223,69,73,79,143,201,244,139,46,9,139,42,118,52,174,237,41,215,237,227,157,10,119,230,242,158,125,28,152,163,89,127,136,194,212,116,196,164,142,244,160,70,102,35,218,138,49,37,110,178,12,110,65,9,92,167,120,187,172,198,113,126,128,102,50,240,134,60,171,83,113,218,16,6,49,228,8,124,207,7,131,15,21,32,62,152,4,55,123,120,243,27,189,56,236,54,39,43,77,137,54,163,34,239,196,34,167,149,194,96,242,88,139,238,44,17,115,146,1,47,184,130,201,19,74,74,194,188,1,158,198,45,96,208,92,98,104,19,131,48,190,49,200,221,239,26,44,80,207,25,190,68,44,20,30,68,61,121,67,151,88,127,116,143,248,124,160,194,72,164,214,242,3,136,198,9,64,253,29,141,240,94,62,75,70,29,1,246,23,49,121,138,153,160,207,218,161,71,97,216,
63,242,104,236,51,57,103,12,62,156,111,100,240,17,56,113,210,73,195,99,88,112,8,146,86,22,32,65,131,224,202,34,177,213,29,178,79,174,68,234,68,103,81,217,251,48,107,222,230,148,181,175,142,164,31,80,196,101,116,214,14,35,125,145,247,208,43,188,102,99,208,254,58,173,157,204,253,30,19,9,72,211,60,160,22,105,170,74,3,129,77,88,165,85,53,197,35,7,56,72,195,144,0,225,140,251,70,24,28,124,196,129,34,179,211,73,72,54,45,24,154,97,222,68,86,79,114,127,64,88,180,67,12,127,18,242,248,40,61,56,18,1,205,180,60,244,101,41,173,227,181,72,14,103,196,186,221,181,204,59,42,190,151,8,80,9,220,242,98,195,12,11,34,253,224,213,23,61,213,148,172,137,207,38,74,46,98,198,59,235,102,114,222,193,204,122,246,254,13,33,144,127,220,112,189,218,100,254,31,8,175,190,101,204,254,9,226,16,160,119,41,124,3,156,177,0,131,39,91,137,52,136,214,78,75,136,174,80,224,76,245,6,207,243,64,104,210,107,3,235,192,157,9,167,0,12,
195,25,62,33,192,204,206,25,33,23,180,153,182,99,205,227,208,38,224,191,152,136,35,77,4,249,218,7,94,96,64,245,3,129,129,155,129,62,9,120,93,120,230,158,7,19,8,173,62,137,115,171,6,69,41,43,252,15,70,172,217,28,245,58,178,255,2,157,32,246,254,43,116,130,56,160,229,71,229,157,24,112,78,250,27,127,225,190,52,177,63,172,7,232,221,188,5,167,53,41,62,127,8,98,91,98,232,186,214,156,35,208,218,206,72,5,196,147,147,100,199,135,97,190,164,165,226,152,127,128,144,220,171,166,179,66,198,249,66,138,115,43,189,205,135,52,134,67,243,69,255,102,6,65,248,0,135,27,197,111,131,105,219,43,76,68,33,235,117,78,97,253,148,66,144,233,221,203,90,225,31,142,168,104,152,127,62,226,98,138,202,22,111,243,113,217,220,71,236,106,172,181,219,15,163,140,195,182,234,143,94,33,240,2,32,177,40,8,21,97,196,69,6,186,141,229,48,167,131,245,3,76,2,191,100,5,227,3,220,129,34,144,4,2,72,226,102,4,224,222,169,112,128,160,255,8,
228,9,225,220,20,166,141,230,151,160,80,158,245,85,112,2,74,175,32,163,91,166,105,155,165,45,173,44,158,198,117,215,8,217,85,25,213,223,78,196,104,100,113,113,20,23,251,163,244,140,92,123,221,61,226,244,157,24,132,76,162,50,188,175,206,67,21,193,69,40,31,197,113,160,54,144,136,107,1,205,46,153,17,242,100,240,110,189,58,246,49,77,211,11,209,0,126,41,78,176,254,22,44,243,139,18,176,225,247,218,165,44,155,210,56,45,138,67,25,203,38,243,34,192,162,65,188,209,93,80,133,127,25,72,93,105,140,107,191,219,134,190,138,111,169,129,162,2,123,119,117,104,241,24,88,168,142,110,199,110,36,165,236,218,228,76,22,30,110,177,240,59,29,8,210,29,192,253,97,50,254,37,114,246,203,3,152,215,194,28,253,146,66,249,37,66,151,0,120,127,20,209,222,192,70,150,16,205,9,229,84,160,127,128,213,163,22,2,25,25,171,167,48,158,175,72,140,75,129,143,23,128,22,218,213,12,221,205,97,240,110,61,41,79,36,224,73,4,136,80,236,235,130,252,238,34,
6,55,240,96,34,68,128,122,7,250,34,254,196,241,34,145,208,130,235,240,181,133,214,131,46,32,63,191,239,86,76,131,203,199,181,104,14,28,228,182,92,173,78,220,134,40,16,163,164,99,5,49,69,124,129,82,136,121,206,200,43,158,236,228,203,236,77,78,182,112,165,255,114,48,42,98,224,126,226,11,102,189,241,183,104,16,42,60,121,209,112,129,216,58,142,40,36,54,121,99,218,161,64,29,43,167,69,240,60,6,249,85,106,1,176,32,69,122,84,253,183,195,9,97,135,186,111,29,210,46,8,224,8,219,29,9,192,46,162,66,179,133,168,63,2,48,204,146,107,242,205,242,78,195,228,112,149,126,13,77,19,167,93,48,73,85,13,205,178,247,157,248,183,60,254,143,190,18,184,38,96,183,181,234,81,57,156,193,191,251,1,118,136,213,72,178,3,157,83,162,76,56,128,7,204,70,31,59,206,253,63,93,235,91,97,
topic "TreeCtrl";
[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,0#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}
[s0;%% [4 TreeCtrl]&]
[s0;%% &]
[s0;%%
@@image:1212&1156
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ǜ<EFBFBD>К<EFBFBD><EFBFBD>縿<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>щ<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>О<EFBFBD><EFBFBD><EFBFBD>︿<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>§<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>泿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ц<EFBFBD><EFBFBD>
怀<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耀
<EFBFBD>ы<EFBFBD><EFBFBD>羿<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Ю
<EFBFBD><EFBFBD>
Б<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ш<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>广
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ъ
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ч<EFBFBD><EFBFBD>
<EFBFBD>
&]
[s0;%% &]
[s0;%% TreeCtrl hierarchy management is based on integer id numbers.
Each node in tree (item) has associated integer id unique for
the tree. Child nodes of item are organized as an array. TreeCtrl
provides operation to insert child nodes at specified array position
and to query child and parent nodes. Root item has fixed id 0.&]
[s0;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* Nested class TreeCtrl`::Node]]}}&]
[s0;%% &]
[s1;:`:`:TreeCtrl`:`:Node`:`:class: [@(0.0.255) class][@(64) _][* TreeCtrl`::Node]&]
[s2;%% This class represents the content and appearance of single
TreeCtrl node`-item.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:image: [_^Image^ Image]_[* image]&]
[s2;%% Node icon.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:margin: [@(0.0.255) int]_[* margin]&]
[s2;%% Space between icon and value of the item, or item`'s widget.
Defaults to 2.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:key: [_^Value^ Value]_[* key]&]
[s2;%% Item key. This is not displayed.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:value: [_^Value^ Value]_[* value]&]
[s2;%% Item value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:display: [@(0.0.255) const]_[_^Display^ Display]_`*[* display]&]
[s2;%% Display used to render value. Defaults to NULL, which means
StdDisplay is to be used.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:size: [_^Size^ Size]_[* size]&]
[s2;%% Size of value area. Defaults to Null `- in that case, value
area size is determined by display`->GetStdSize(value) or ctrl`->GetMinSize()
if widget for item is used.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:ctrl: [_^Ptr^ Ptr][@(0.0.255) <][_^Ctrl^ Ctrl][@(0.0.255) >]_[* ctrl]&]
[s2;%% Widget associated with item.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:canopen: [@(0.0.255) bool]_[* canopen]&]
[s2;%% Item can be opened.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:canselect: [@(0.0.255) bool]_[* canselect]&]
[s2;%% Item can be selected.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:SetImage`(const Image`&`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&
]_[* SetImage]([@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img])&]
[s2;%% Sets image.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Set`(const Value`&`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&]_
[* Set]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s2;%% Sets both key and value to [%-*@3 v].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Set`(const Value`&`,const Value`&`): [_^TreeCtrl`:`:Node^ Node
][@(0.0.255) `&]_[* Set]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v],
[@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 t])&]
[s2;%% Sets key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:SetDisplay`(const Display`&`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&
]_[* SetDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 d])&]
[s2;%% Sets display.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:SetSize`(Size`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&]_[* SetS
ize]([_^Size^ Size]_[*@3 sz])&]
[s2;%% Sets size.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:SetCtrl`(Ctrl`&`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&]_[* Se
tCtrl]([_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 `_ctrl])&]
[s2;%% Sets widget.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:CanOpen`(bool`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&]_[* CanO
pen]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% Sets canopen flag.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:CanSelect`(bool`): [_^TreeCtrl`:`:Node^ Node][@(0.0.255) `&]_[* Ca
nSelect]([@(0.0.255) bool]_[*@3 b])&]
[s2;%% Sets canselect flag.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(`): [* Node]()&]
[s2;%% Default constructor.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(const Image`&`,const Value`&`): [* Node]([@(0.0.255) const
]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&
]_[*@3 v])&]
[s2;%% Assigns icon, key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(const Image`&`,const Value`&`,const Value`&`): [* Node](
[@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [@(0.0.255) const]_[_^Value^ Va
lue][@(0.0.255) `&]_[*@3 v], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 t])&]
[s2;%% Assigns icon, key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(const Value`&`): [* Node]([@(0.0.255) const]_[_^Value^ Value
][@(0.0.255) `&]_[*@3 v])&]
[s2;%% Assigns key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(const Value`&`,const Value`&`): [* Node]([@(0.0.255) const
]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_
[*@3 t])&]
[s2;%% Assigns key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(Ctrl`&`): [* Node]([_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 ctrl])&]
[s2;%% Assigns widget.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Node`:`:Node`(const Image`&`,Ctrl`&`,int`,int`): [* Node]([@(0.0.255) co
nst]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 ctrl],
[@(0.0.255) int]_[*@3 cx]_`=_[@3 0], [@(0.0.255) int]_[*@3 cy]_`=_[@3 0])&]
[s2;%% Assigns icon, widget and its dimensions.&]
[s0;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* CtrlCtrl public members]]}}&]
[s3; &]
[s1;:TreeCtrl`:`:class: [@(0.0.255) class]_[* TreeCtrl]_:_[@(0.0.255) public]_[*@3 Ctrl]&]
[s2;%% Tree widget.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenOpen: [_^Callback1^ Callback1][@(0.0.255) <int>]_[* WhenOpen]&]
[s2;%% Tree item was opened, parameter is the item id. &]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenClose: [_^Callback1^ Callback1][@(0.0.255) <int>]_[* WhenClose]&]
[s2;%% Tree item was closed, parameter is the item id. &]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenLeftClick: [_^Callback^ Callback]_[* WhenLeftClick]&]
[s2;%% Tree item was clicked. Cursor identifies clicked item. You
can get the click position within the item using GetItemClickPos
method.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenLeftDouble: [_^Callback^ Callback]_[* WhenLeftDouble]&]
[s2;%% Tree item was double`-clicked. Cursor identifies clicked item.
You can get the click position within the item using GetItemClickPos
method.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenBar: [_^Callback1^ Callback1][@(0.0.255) <]Bar[@(0.0.255) `&>]_[* WhenBa
r]&]
[s2;%% Use to supply context menu.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenSel: [_^Callback^ Callback]_[* WhenSel]&]
[s2;%% Cursor or selection has changed (including KillCursor).&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenDrag: [_^Callback^ Callback]_[* WhenDrag]&]
[s2;%% Triggered when user attempts dragging an item.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenDropItem: [_^Callback2^ Callback2][@(0.0.255) <int],
[_^PasteClip^ PasteClip][@(0.0.255) `&>]_[* WhenDropItem]&]
[s2;%% This callback manages drag`&drop into TreeCtrl items. The
first parameter is an id of item. See [^PasteClip^ PasteClip] for
more details.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenDropInsert: [_^Callback3^ Callback3][@(0.0.255) <int],
[@(0.0.255) int], [_^PasteClip^ PasteClip][@(0.0.255) `&>]_[* WhenDropInsert]&]
[s2;%% This callback manages drag`&drop into insert positions between
TreeCtrl items. The first parameter is an id of parent item,
the second parameter is insert index within parent`'s child list.
See [^PasteClip^ PasteClip] for more details.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenDrop: [_^Callback1^ Callback1][@(0.0.255) <][_^PasteClip^ PasteClip][@(0.0.255) `&
>]_[* WhenDrop]&]
[s2;%% This callback manages drag`&drop when WhenDropItem and WhenDropInsert
do not apply `- drop into empty area. See [^PasteClip^ PasteClip]
for more details.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenCursor: [_^Callback^ Callback]_[* WhenCursor]&]
[s2;%% Cursor has changed (including KillCursor). Deprecated.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:WhenSelection: [_^Callback^ Callback]_[* WhenSelection]&]
[s2;%% Selection has changed. Deprecated.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetRoot`(const TreeCtrl`:`:Node`&`): [@(0.0.255) void]_[* SetRoot]([@(0.0.255) c
onst]_[_^TreeCtrl`:`:Node^ TreeCtrl`::Node][@(0.0.255) `&]_[*@3 n])&]
[s2;%% Sets the content of root item to [%-*@3 n]. Full deep copy of
[%-*@3 n] is performed.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetRoot`(const Image`&`,Value`): [@(0.0.255) void]_[* SetRoot]([@(0.0.255) c
onst]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Value^ Value]_[*@3 v])&]
[s2;%% Sets image, key and value of root item. [%-*@3 v] is used both
for key and value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetRoot`(const Image`&`,Value`,Value`): [@(0.0.255) void]_[* SetRoot]([@(0.0.255) c
onst]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Value^ Value]_[*@3 key],
[_^Value^ Value]_[*@3 text])&]
[s2;%% Sets the image, key and value of root item.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:SetRoot`(const Image`&`,Ctrl`&`,int`,int`): [@(0.0.255) void]_[* SetRoot
]([@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Ctrl^ Ctrl][@(0.0.255) `&]_
[*@3 ctrl], [@(0.0.255) int]_[*@3 cx]_`=_[@3 0], [@(0.0.255) int]_[*@3 cy]_`=_[@3 0])&]
[s2;%% Sets widget to be at root item. Only reference to [%-*@3 ctrl]
is stored `-> widget object lifetime must exceed TreeCtrl`'s
lifetime. Dimensions of widget should be [%-*@3 cx], [%-*@3 cy].
If either [%-*@3 cx] or [%-*@3 cy] are zero, GetMinSize dimension
is used.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Insert`(int`,int`,const TreeCtrl`:`:Node`&`): [@(0.0.255) int]_[* Insert
]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[_^TreeCtrl`:`:Node^ T
reeCtrl`::Node][@(0.0.255) `&]_[*@3 n])&]
[s5;:TreeCtrl`:`:Insert`(int`,int`): [@(0.0.255) int]_[* Insert]([@(0.0.255) int]_[*@3 parent
id], [@(0.0.255) int]_[*@3 i])&]
[s5;:TreeCtrl`:`:Insert`(int`,int`,const Image`&`,Value`,bool`): [@(0.0.255) int]_[* Inse
rt]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[_^Image^ I
mage][@(0.0.255) `&]_[*@3 img], [_^Value^ Value]_[*@3 value], [@(0.0.255) bool]_[*@3 withopen
]_`=_[@(0.0.255) false])&]
[s5;:TreeCtrl`:`:Insert`(int`,int`,const Image`&`,Value`,Value`,bool`): [@(0.0.255) int
]_[* Insert]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) int]_[*@3 i],
[@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Value^ Value]_[*@3 key],
[_^Value^ Value]_[*@3 value], [@(0.0.255) bool]_[*@3 withopen]_`=_[@(0.0.255) false])&]
[s5;:TreeCtrl`:`:Insert`(int`,int`,const Image`&`,Ctrl`&`,int`,int`,bool`): [@(0.0.255) i
nt]_[* Insert]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) int]_[*@3 i],
[@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], [_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 c
], [@(0.0.255) int]_[*@3 cx]_`=_[@3 0], [@(0.0.255) int]_[*@3 cy]_`=_[@3 0],
[@(0.0.255) bool]_[*@3 wo]_`=_[@(0.0.255) false])&]
[s2; Inserts child item to parent specified by id. Distinct variants
set various attributes to TreeCtrl`::Node of insterted item.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Add`(int`,const TreeCtrl`:`:Node`&`): [@(0.0.255) int]_[* Add]([@(0.0.255) i
nt]_[*@3 parentid], [@(0.0.255) const]_[_^TreeCtrl`:`:Node^ TreeCtrl`::Node][@(0.0.255) `&
]_[*@3 n])&]
[s5;:TreeCtrl`:`:Add`(int`): [@(0.0.255) int]_[* Add]([@(0.0.255) int]_[*@3 parentid])&]
[s5;:TreeCtrl`:`:Add`(int`,const Image`&`,Value`,bool`): [@(0.0.255) int]_[* Add]([@(0.0.255) i
nt]_[*@3 parentid], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img],
[_^Value^ Value]_[*@3 value], [@(0.0.255) bool]_[*@3 withopen]_`=_[@(0.0.255) false])&]
[s5;:TreeCtrl`:`:Add`(int`,const Image`&`,Value`,Value`,bool`): [@(0.0.255) int]_[* Add](
[@(0.0.255) int]_[*@3 parentid], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img],
[_^Value^ Value]_[*@3 key], [_^Value^ Value]_[*@3 value], [@(0.0.255) bool]_[*@3 withopen]_`=
_[@(0.0.255) false])&]
[s5;:TreeCtrl`:`:Add`(int`,const Image`&`,Ctrl`&`,int`,int`,bool`): [@(0.0.255) int]_[* A
dd]([@(0.0.255) int]_[*@3 parentid], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 i
mg], [_^Ctrl^ Ctrl][@(0.0.255) `&]_[*@3 ctrl], [@(0.0.255) int]_[*@3 cx]_`=_[@3 0],
[@(0.0.255) int]_[*@3 cy]_`=_[@3 0], [@(0.0.255) bool]_[*@3 withopen]_`=_[@(0.0.255) false])&]
[s2; Inserts child item at the end of list of parent`'s child items.
Parent is specified by id. Distinct variants set various attributes
to TreeCtrl`::Node of insterted item.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Remove`(int`): [@(0.0.255) void]_[* Remove]([@(0.0.255) int]_[*@3 id])&]
[s2;%% Removes item with [%-*@3 id] from the tree.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:RemoveChildren`(int`): [@(0.0.255) void]_[* RemoveChildren]([@(0.0.255) in
t]_[*@3 id])&]
[s2;%% Removes all child items from parent item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Swap`(int`,int`): [@(0.0.255) void]_[* Swap]([@(0.0.255) int]_[*@3 id1],
[@(0.0.255) int]_[*@3 id2])&]
[s2;%% Swaps two tree items.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:SwapChildren`(int`,int`,int`): [@(0.0.255) void]_[* SwapChildren]([@(0.0.255) i
nt]_[*@3 parentid], [@(0.0.255) int]_[*@3 i1], [@(0.0.255) int]_[*@3 i2])&]
[s2;%% Swaps [%-*@3 parentid] children with indices [%-*@3 i1] and [%-*@3 i2].&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:GetChildCount`(int`)const: [@(0.0.255) int]_[* GetChildCount]([@(0.0.255) i
nt]_[*@3 id])_[@(0.0.255) const]&]
[s2;%% Returns the number of child items of parent item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetChild`(int`,int`)const: [@(0.0.255) int]_[* GetChild]([@(0.0.255) int]_
[*@3 id], [@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&]
[s2;%% Returns the identifier of child at index [%-*@3 i] of parent
item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetChildIndex`(int`,int`)const: [@(0.0.255) int]_[* GetChildIndex]([@(0.0.255) i
nt]_[*@3 parentid], [@(0.0.255) int]_[*@3 childid])_[@(0.0.255) const]&]
[s2;%% Returns an index of child item of [%-*@3 parentid] with id [%-*@3 childid].&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:GetParent`(int`)const: [@(0.0.255) int]_[* GetParent]([@(0.0.255) int]_[*@3 i
d])_[@(0.0.255) const]&]
[s2;%% Returns the parent identifier of child with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Get`(int`)const: [_^Value^ Value]_[* Get]([@(0.0.255) int]_[*@3 id])_[@(0.0.255) c
onst]&]
[s3;^Value^ &]
[s4;^Value^ &]
[s5;:TreeCtrl`:`:GetValue`(int`)const: [_^Value^ Value]_[* GetValue]([@(0.0.255) int]_[*@3 id
])_[@(0.0.255) const]&]
[s2;%% Returns the value of item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:operator`[`]`(int`)const: [_^Value^ Value]_[* operator`[`]]([@(0.0.255) in
t]_[*@3 id])_[@(0.0.255) const]&]
[s2;%% Returns the key of item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Set`(int`,Value`): [@(0.0.255) void]_[* Set]([@(0.0.255) int]_[*@3 id],
[_^Value^ Value]_[*@3 v])&]
[s2;%% Sets the value [/ and] key of item with [%-*@3 id].&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:Set`(int`,Value`,Value`): [@(0.0.255) void]_[* Set]([@(0.0.255) int]_[*@3 id
], [_^Value^ Value]_[*@3 key], [_^Value^ Value]_[*@3 value])&]
[s2;%% Sets the value and key of item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetValue`(const Value`&`): [@(0.0.255) void]_[* SetValue]([@(0.0.255) cons
t]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s2;%% Sets the value of item with cursor, key is unchanged.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:SetDisplay`(int`,const Display`&`): [@(0.0.255) void]_[* SetDisplay]([@(0.0.255) i
nt]_[*@3 id], [@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 display])&]
[s2;%% Sets the display of [%-*@3 id] item.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:RefreshItem`(int`): [@(0.0.255) void]_[* RefreshItem]([@(0.0.255) int]_[*@3 i
d])&]
[s2;%% Forces the repainting of item (e.g. when its appearance changes
in a way that cannot be detected by TreeCtrl widget).&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:GetLineCount`(`): [@(0.0.255) int]_[* GetLineCount]()&]
[s2;%% Gets the current number of lines `- visible items `- in TreeCtrl.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetItemAtLine`(int`): [@(0.0.255) int]_[* GetItemAtLine]([@(0.0.255) int]_
[*@3 i])&]
[s2;%% Gets the id of item at line i.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetLineAtItem`(int`): [@(0.0.255) int]_[* GetLineAtItem]([@(0.0.255) int]_
[*@3 id])&]
[s2;%% Gets the line of item with [%-*@3 id]. If item is not visible,
returns negative value.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetNode`(int`)const: [_^TreeCtrl`:`:Node^ Node]_[* GetNode]([@(0.0.255) in
t]_[*@3 id])_[@(0.0.255) const]&]
[s2;%% Returns attributes of item with [%-*@3 id].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetNode`(int`,const TreeCtrl`:`:Node`&`): [@(0.0.255) void]_[* SetNode](
[@(0.0.255) int]_[*@3 id], [@(0.0.255) const]_[_^TreeCtrl`:`:Node^ TreeCtrl`::Node][@(0.0.255) `&
]_[*@3 n])&]
[s2;%% Sets attributes.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:IsOpen`(int`)const: [@(0.0.255) bool]_[* IsOpen]([@(0.0.255) int]_[*@3 id])_
[@(0.0.255) const]&]
[s2;%% Tests whether item is opened.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Open`(int`,bool`): [@(0.0.255) void]_[* Open]([@(0.0.255) int]_[*@3 id],
[@(0.0.255) bool]_[*@3 open]_`=_[@(0.0.255) true])&]
[s2;%% Opens or closes (if [%-*@3 open] is false) item with id `- makes
all child items visible.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Close`(int`): [@(0.0.255) void]_[* Close]([@(0.0.255) int]_[*@3 id])&]
[s2;%% Same as Open(id, false).&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:OpenDeep`(int`,bool`): [@(0.0.255) void]_[* OpenDeep]([@(0.0.255) int]_[*@3 i
d], [@(0.0.255) bool]_[*@3 open]_`=_[@(0.0.255) true])&]
[s2;%% Opens/closes item with [%-*@3 id] and all of its child items.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:CloseDeep`(int`): [@(0.0.255) void]_[* CloseDeep]([@(0.0.255) int]_[*@3 id])
&]
[s2;%% Same as OpenDeep([%-*@3 id], false).&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:MakeVisible`(int`): [@(0.0.255) void]_[* MakeVisible]([@(0.0.255) int]_[*@3 i
d])&]
[s2;%% Opens all parent items of item with [%-*@3 id] to make it visible.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetCursorLine`(int`): [@(0.0.255) void]_[* SetCursorLine]([@(0.0.255) int]_
[*@3 i])&]
[s2;%% Sets cursor in the tree to be at visible item line [%-*@3 i].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetCursorLine`(`)const: [@(0.0.255) int]_[* GetCursorLine]()_[@(0.0.255) c
onst]&]
[s2;%% Returns visible item line.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:KillCursor`(`): [@(0.0.255) void]_[* KillCursor]()&]
[s2;%% Removes cursor from tree.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SetCursor`(int`): [@(0.0.255) void]_[* SetCursor]([@(0.0.255) int]_[*@3 id])
&]
[s2;%% Sets cursor to item with [%-*@3 id]. If item is not visible,
MakeVisible(id) is called first.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetCursor`(`)const: [@(0.0.255) int]_[* GetCursor]()_[@(0.0.255) const]&]
[s2;%% Returns id of item that currently has cursor or negative value
if there is none.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:IsCursor`(`)const: [@(0.0.255) bool]_[* IsCursor]()_[@(0.0.255) const]&]
[s2;%% Returns true if there is cursor in the tree.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetItemClickPos`(`)const: [_^Point^ Point]_[* GetItemClickPos]()_[@(0.0.255) c
onst]&]
[s2;%% Returns current mouse position within item Display rectangle
when clicked.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetScroll`(`)const: [_^Point^ Point]_[* GetScroll]()_[@(0.0.255) const]&]
[s2;%% Returns the scroll position of tree.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:ScrollTo`(Point`): [@(0.0.255) void]_[* ScrollTo]([_^Point^ Point]_[*@3 sc])
&]
[s2;%% Scrolls tree back to value previously returned by GetScroll.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Get`(`)const: [_^Value^ Value]_[* Get]()_[@(0.0.255) const]&]
[s2;%% Returns key of item with cursor or Null if there is none.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetValue`(`)const: [_^Value^ Value]_[* GetValue]()_[@(0.0.255) const]&]
[s2;%% Returns value of item with cursor or Null if there is none.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Find`(Value`): [@(0.0.255) int]_[* Find]([_^Value^ Value]_[*@3 key])&]
[s2;%% Returns id of item with [%-*@3 key] or negative value if not
found.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:FindSetCursor`(Value`): [@(0.0.255) bool]_[* FindSetCursor]([_^Value^ Valu
e]_[*@3 key])&]
[s2;%% Places cursor to first item with [%-*@3 key], returns true if
found.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Sort`(int`,const ValueOrder`&`,bool`): [@(0.0.255) void]_[* Sort]([@(0.0.255) i
nt]_[*@3 id], [@(0.0.255) const]_[_^ValueOrder^ ValueOrder][@(0.0.255) `&]_[*@3 order],
[@(0.0.255) bool]_[*@3 byvalue]_`=_[@(0.0.255) false])&]
[s2;%% Sorts child items of item with [%-*@3 id] using [%-*@3 order]
sorting predicate. If [%-*@3 byvalue] is false, items are sorted
by keys, if true, by values.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SortDeep`(int`,const ValueOrder`&`,bool`): [@(0.0.255) void]_[* SortDeep
]([@(0.0.255) int]_[*@3 id], [@(0.0.255) const]_[_^ValueOrder^ ValueOrder][@(0.0.255) `&]_[*@3 o
rder], [@(0.0.255) bool]_[*@3 byvalue]_`=_[@(0.0.255) false])&]
[s2;%% Sorts child items of item with [%-*@3 id] using [%-*@3 order]
sorting predicate. If [%-*@3 byvalue] is false, items are sorted
by keys, if true, by values. After sorting, it recursively calls
SortDeep for all child items.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Sort`(int`,int`(`*`)`(const Value`&v1`,const Value`&v2`)`,bool`): [@(0.0.255) v
oid]_[* Sort]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) const
]_Value[@(0.0.255) `&]_v1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2)_`=_StdValueCompa
re, [@(0.0.255) bool]_[*@3 byvalue]_`=_[@(0.0.255) false])&]
[s2;%% Sort with simplified predicate [%-*@3 compare].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SortDeep`(int`,int`(`*`)`(const Value`&v1`,const Value`&v2`)`,bool`): [@(0.0.255) v
oid]_[* SortDeep]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) c
onst]_Value[@(0.0.255) `&]_v1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2)_`=_StdValueC
ompare, [@(0.0.255) bool]_[*@3 byvalue]_`=_[@(0.0.255) false])&]
[s2;%% SortDeep with simplified predicate [%-*@3 compare].&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SortByValue`(int`,const ValueOrder`&`): [@(0.0.255) void]_[* SortByValue
]([@(0.0.255) int]_[*@3 id], [@(0.0.255) const]_[_^ValueOrder^ ValueOrder][@(0.0.255) `&]_[*@3 o
rder])&]
[s5;:TreeCtrl`:`:SortDeepByValue`(int`,const ValueOrder`&`): [@(0.0.255) void]_[* SortDee
pByValue]([@(0.0.255) int]_[*@3 id], [@(0.0.255) const]_[_^ValueOrder^ ValueOrder][@(0.0.255) `&
]_[*@3 order])&]
[s5;:TreeCtrl`:`:SortByValue`(int`,int`(`*`)`(const Value`&v1`,const Value`&v2`)`): [@(0.0.255) v
oid]_[* SortByValue]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) c
onst]_Value[@(0.0.255) `&]_v1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2)_`=_StdValueC
ompare)&]
[s5;:TreeCtrl`:`:SortDeepByValue`(int`,int`(`*`)`(const Value`&v1`,const Value`&v2`)`): [@(0.0.255) v
oid]_[* SortDeepByValue]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) c
onst]_Value[@(0.0.255) `&]_v1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2)_`=_StdValueC
ompare)&]
[s2;%% Convenience variants call their basic counterparts with byvalue
equal to true.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Sort`(int`,const ValuePairOrder`&`): [@(0.0.255) void]_[* Sort]([@(0.0.255) i
nt]_[*@3 id], [@(0.0.255) const]_[_^ValuePairOrder^ ValuePairOrder][@(0.0.255) `&]_[*@3 ord
er])&]
[s5;:TreeCtrl`:`:Sort`(int`,int`(`*`)`(const Value`&k1`,const Value`&v1`,const Value`&k2`,const Value`&v2`)`): [@(0.0.255) v
oid]_[* Sort]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) const
]_Value[@(0.0.255) `&]_k1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v1,
[@(0.0.255) const]_Value[@(0.0.255) `&]_k2, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2))&]
[s2;%% Sorts the children list of parent [%-*@3 id]. Note that if [%-*@3 id]
is 0, the whole tree is sorted. The grandchildren are left intact.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:SortDeep`(int`,const ValuePairOrder`&`): [@(0.0.255) void]_[* SortDeep](
[@(0.0.255) int]_[*@3 id], [@(0.0.255) const]_[_^ValuePairOrder^ ValuePairOrder][@(0.0.255) `&
]_[*@3 order])&]
[s5;:TreeCtrl`:`:SortDeep`(int`,int`(`*`)`(const Value`&k1`,const Value`&v1`,const Value`&k2`,const Value`&v2`)`): [@(0.0.255) v
oid]_[* SortDeep]([@(0.0.255) int]_[*@3 id], [@(0.0.255) int]_(`*[*@3 compare])([@(0.0.255) c
onst]_Value[@(0.0.255) `&]_k1, [@(0.0.255) const]_Value[@(0.0.255) `&]_v1,
[@(0.0.255) const]_Value[@(0.0.255) `&]_k2, [@(0.0.255) const]_Value[@(0.0.255) `&]_v2))&]
[s2;%% Sorts the subtree of parent [%-*@3 id]. Note that if [%-*@3 id]
is 0, the whole tree is sorted. The grandchildren are sorted
as well.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:Clear`(`): [@(0.0.255) void]_[* Clear]()&]
[s2;%% Removes all items from the tree.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:ClearSelection`(`): [@(0.0.255) void]_[* ClearSelection]()&]
[s2;%% Clears any selection.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:SelectOne`(int`,bool`): [@(0.0.255) void]_[* SelectOne]([@(0.0.255) int]_[*@3 i
d], [@(0.0.255) bool]_[*@3 sel])&]
[s2;%% Selects/unselects single item with id.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:IsSelected`(int`)const: [@(0.0.255) bool]_[* IsSelected]([@(0.0.255) int]_
[*@3 id])_[@(0.0.255) const]&]
[s2;%% Returns true if item with [%-*@3 id] is selected.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:IsSel`(int`)const: [@(0.0.255) bool]_[* IsSel]([@(0.0.255) int]_[*@3 id])_[@(0.0.255) c
onst]&]
[s2;%% Returns true if item with [%-*@3 id] is selected [*/ or has cursor][/ .]&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:GetSelectCount`(`)const: [@(0.0.255) int]_[* GetSelectCount]()_[@(0.0.255) c
onst]&]
[s2;%% The number of selected items.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:IsSelDeep`(int`)const: [@(0.0.255) bool]_[* IsSelDeep]([@(0.0.255) int]_[*@3 i
d])_[@(0.0.255) const]&]
[s2;%% True, if IsSel is true for the item or if IsSelDeep is true
for its parent (if any item in parenthood chain is selected).&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:GetSel`(`)const: [_^Vector^ Vector][@(0.0.255) <int>]_[* GetSel]()_[@(0.0.255) c
onst]&]
[s2;%% Returns ids of all items with IsSel is true (note that it
includes cursor item if there is no selection).&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Remove`(const Vector`<int`>`&`): [@(0.0.255) void]_[* Remove]([@(0.0.255) c
onst]_[_^Vector^ Vector][@(0.0.255) <int>`&]_[*@3 id])&]
[s2;%% Removes a set of items, [%-*@3 id ]is a list of item ids to
remove.&]
[s3;%% &]
[s4; &]
[s5;:TreeCtrl`:`:RemoveSelection`(`): [@(0.0.255) void]_[* RemoveSelection]()&]
[s2;%% Same as Remove(GetSel()) `- removes all selected items.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:Dump`(`): [@(0.0.255) void]_[* Dump]()&]
[s2;%% Diagnostic dump of tree content to standard log. Exists in
debug mode only.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:NoCursor`(bool`): [_^TreeCtrl^ TreeCtrl][@(0.0.255) `&]_[* NoCursor]([@(0.0.255) b
ool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% Tree does not allow cursor.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:NoRoot`(bool`): [_^TreeCtrl^ TreeCtrl][@(0.0.255) `&]_[* NoRoot]([@(0.0.255) b
ool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% Root item is not shown.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:LevelCx`(int`): [_^TreeCtrl^ TreeCtrl][@(0.0.255) `&]_[* LevelCx]([@(0.0.255) i
nt]_[*@3 cx])&]
[s2;%% Indentation per single hierarchy level. Default value is 16
pixels.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:MultiSelect`(bool`): [_^TreeCtrl^ TreeCtrl][@(0.0.255) `&]_[* MultiSelect](
[@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% Allows selection of items.&]
[s3; &]
[s4; &]
[s5;:TreeCtrl`:`:NoBackground`(bool`): [_^TreeCtrl^ TreeCtrl][@(0.0.255) `&]_[* NoBackgroun
d]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% White background of tree is not painted.&]
[s0;%% &]
[s0; ]

View file

@ -26,7 +26,7 @@ file
Link.cpp,
TopicWin.cpp,
Move.cpp,
IdeTopic.cpp,
CodeRef.cpp,
TopicI.icpp,
Topic.lay,
Topic.iml,

View file

@ -1,454 +1,461 @@
#include "Browser.h"
#define CODEITEM "37138531426314131252341829483370"
#define STRUCTITEM "37138531426314131252341829483380"
#define BEGINSTYLE "05600065144404261032431302351956"
#define ENDSTYLE "96390100711032703541132217272105"
static const char styles[] =
"[ $$0,0#00000000000000000000000000000000:Default]"
"[i448;a25;kKO9;2 $$1,0#" CODEITEM ":codeitem]"
"[i448;a25;kKO9;3 $$2,0#" STRUCTITEM ":structitem]"
"[l288;2 $$3,0#27521748481378242620020725143825:desc]"
"[H6;0 $$4,0#" BEGINSTYLE ":begin]"
"[l288;a25;kK~~~.1408;@3;2 $$5,0#61217621437177404841962893300719:param]"
"[0 $$7,0#" ENDSTYLE ":end]"
;
void TopicEditor::JumpToDefinition()
{
PostCallback(callback1(IdeGotoCodeRef, editor.GetFormatInfo().label));
}
void TopicEditor::Label(String& label)
{
Save();
if(ref.item.IsMultiSelect())
ref.item.ClearSelection();
ref.item.MultiSelect(false);
ref.Title("Reference");
ref.Set(label);
ref.classlist.Hide();
if(ref.Execute() != IDOK)
return;
label = ref.Get();
}
Uuid CodeItemUuid()
{
return ScanUuid(CODEITEM);
}
Uuid StructItemUuid()
{
return ScanUuid(STRUCTITEM);
}
Uuid BeginUuid()
{
return ScanUuid(BEGINSTYLE);
}
Uuid EndUuid()
{
static Uuid u = ScanUuid(ENDSTYLE);
return u;
}
void TopicEditor::FindBrokenRef()
{
Uuid codeitem = CodeItemUuid();
Uuid stritem = StructItemUuid();;
for(;;) {
if(IsNull(topicpath))
return;
const RichText& txt = editor.Get();
int c = editor.GetCursor();
int i = txt.FindPart(c);
while(++i < txt.GetPartCount()) {
if(txt.IsPara(i)) {
Uuid style = txt.GetParaStyle(i);
if(style == codeitem || style == stritem) {
RichPara para = txt.Get(i);
if(para.format.label == "noref")
continue;
if(!IsNull(para.format.label) && GetCodeRefItem(para.format.label))
continue;
editor.Move(txt.GetPartPos(i));
return;
}
}
}
if(!topic.IsCursor())
break;
c = topic.GetCursor() + 1;
if(c >= topic.GetCount()) {
PromptOK("No more invalid references.");
break;
}
topic.SetCursor(c);
if(!IsNull(topicpath))
editor.Move(0);
}
}
void TopicEditor::Tools(Bar& bar)
{
bar.Add("Insert code item..", IdeCommonImg::InsertItem(), THISBACK(InsertItem))
.Key(K_CTRL_INSERT);
String l = editor.GetFormatInfo().label;
bool b = l.GetCount() > 2 && l[0] == ':' && l[1] == ':';
bar.Add(b, "See referenced code", IdeCommonImg::Source(), THISBACK(JumpToDefinition))
.Key(K_ALT_J);
bar.Add("Find broken references..", IdeCommonImg::FindBrokenRef(), THISBACK(FindBrokenRef))
.Key(K_CTRL_F3);
#ifdef REPAIR
bar.Separator();
bar.Add("Repair!", CtrlImg::Toggle(), THISBACK(Repair)).Key(K_ALT_F5);
bar.Separator();
#endif
}
void TopicEditor::MainTool(Bar& bar)
{
editor.StyleTool(bar);
bar.Gap();
editor.FontTools(bar);
bar.Gap();
editor.InkTool(bar);
editor.PaperTool(bar);
bar.Gap();
editor.LanguageTool(bar);
editor.SpellCheckTool(bar);
bar.Gap();
editor.IndexEntryTool(bar);
bar.Break();
editor.HyperlinkTool(bar, 300, K_CTRL_H);
bar.Gap();
editor.ParaTools(bar);
bar.Gap();
editor.EditTools(bar);
bar.Gap();
bar.Add("Print", CtrlImg::print(), THISBACK(Print))
.Key(K_CTRL_P);
bar.GapRight();
bar.Break();
editor.LabelTool(bar, 500, K_CTRL_M, "Code reference");
bar.Gap();
Tools(bar);
bar.Gap();
editor.TableTools(bar);
}
String NaturalDeQtf(const char *s) {
StringBuffer r;
r.Reserve(256);
bool cm = false;
while(*s) {
if(*s == ' ')
r.Cat(cm ? ' ' : '_');
else {
if((byte)*s > ' ' && !IsDigit(*s) && !IsAlpha(*s) && (byte)*s < 128)
r.Cat('`');
r.Cat(*s);
if(*s == ',')
cm = true;
else
cm = false;
}
s++;
}
return r;
}
static int sSplitT(int c) {
return c == ';' || c == '<' || c == '>' || c == ',';
}
String DecoratedItem(const String& name, const CppItem& m, const char *natural)
{
String qtf = "[%00-00K ";
Vector<ItemTextPart> n = ParseItemNatural(name, m, natural);
if(m.virt)
qtf << "[@B virtual] ";
if(m.kind == CLASSFUNCTION || m.kind == CLASSFUNCTIONTEMPLATE)
qtf << "[@B static] ";
Vector<String> qt = Split(m.qptype, sSplitT, false);
Vector<String> tt = Split(m.qtype, sSplitT, false);
for(int i = 0; i < n.GetCount(); i++) {
ItemTextPart& p = n[i];
qtf << "[";
switch(p.type) {
case ITEM_PNAME:
qtf << "*";
case ITEM_NUMBER:
qtf << "@r";
break;
case ITEM_TNAME:
qtf << "*@g";
break;
case ITEM_NAME:
qtf << "*";
break;
case ITEM_UPP:
qtf << "@c";
break;
case ITEM_CPP_TYPE:
case ITEM_CPP:
qtf << "@B";
break;
default:
int q = p.type - ITEM_PTYPE;
if(q >= 0 && q < qt.GetCount() && *qt[q] == ':')
qtf << "_^" << qt[q] << '^';
q = p.type - ITEM_TYPE;
if(q >= 0 && q < tt.GetCount() && *tt[q] == ':')
qtf << "_^" << tt[q] << '^';
break;
}
qtf << ' ';
qtf << NaturalDeQtf(String(~m.natural + p.pos, p.len));
qtf << ']';
}
return qtf + "]";
}
String TopicEditor::CreateQtf(const String& item, const String& name, const CppItem& m, bool onlyhdr)
{
String qtf;
bool str = m.kind == STRUCT || m.kind == STRUCTTEMPLATE;
if(!str)
qtf << "[s4 &]";
String st = str ? "[s2;" : "[s1;";
String k = st + ':' + DeQtf(item) + ": ";
if(m.IsTemplate() && str) {
int q = 0;
int w = 0;
while(q < m.natural.GetLength()) {
if(m.natural[q] == '<')
w++;
if(m.natural[q] == '>') {
w--;
if(w == 0) {
q++;
break;
}
}
q++;
}
qtf << "[s2:noref: " << DecoratedItem(name, m, m.natural.Mid(0, q)) << "&][s2 " << k;
if(q < m.natural.GetLength()) {
while((byte)m.natural[q] <= 32)
q++;
qtf << DecoratedItem(name, m, m.natural.Mid(q));
}
}
else
qtf << k << DecoratedItem(name, m, m.natural);
qtf << "&]";
if(onlyhdr)
return qtf;
qtf << "[s3%% ";
String d;
Vector<String> t = Split(m.tname, ';');
for(int i = 0; i < t.GetCount(); i++) {
if(i)
d << ' ';
d << "[%-*@g " << DeQtf(t[i]) << "]";
}
d.Clear();
d = "[%% ";
Vector<String> p = Split(m.pname, ';');
bool was = false;
if(!str)
for(int i = 0; i < p.GetCount(); i++)
d << " [%-*@r " << DeQtf(p[i]) << "]";
if(!str && p.GetCount())
qtf << d << '.';
qtf << "&]";
qtf << "[s7 &]";
return qtf;
}
void TopicEditor::InsertItem()
{
if(IsNull(topicpath))
return;
Save();
ref.Title("Insert");
if(ref.item.IsCursor())
ref.item.SetFocus();
ref.item.MultiSelect();
ref.classlist.Show();
int c = ref.Execute();
if(c == IDCANCEL)
return;
if(c == IDYES) {
String qtf = "&{{1 ";
bool next = false;
for(int i = 0; i < ref.scope.GetCount(); i++) {
String s = ref.scope.Get(i, 1);
if(*s != '<') {
if(next)
qtf << ":: ";
qtf << DeQtf(s);
next = true;
}
}
qtf << "}}&";
editor.PasteText(ParseQTF(qtf));
return;
}
String qtf;
if(ref.item.IsSelection()) {
for(int i = 0; i < ref.item.GetCount(); i++)
if(ref.item.IsSelected(i)) {
const CppItemInfo& m = ref.GetItemInfo(i);
qtf << CreateQtf(ref.GetCodeRef(i), m.name, m);
}
}
else
if(ref.item.IsCursor()) {
const CppItemInfo& m = ref.GetItemInfo();
qtf << CreateQtf(ref.GetCodeRef(), m.name, m);
}
else
return;
editor.BeginOp();
editor.PasteText(ParseQTF(styles + qtf));
editor.PrevPara();
editor.PrevPara();
}
void TopicEditor::InsertNew(const String& coderef)
{
const CppItem *m = GetCodeRefItem(coderef);
if(!m)
return;
editor.BeginOp();
editor.PasteText(ParseQTF(styles + CreateQtf(coderef, m->name, *m)));
editor.PrevPara();
editor.PrevPara();
}
void TopicEditor::GoTo(const String& _topic, const String& link, const String& create)
{
if(topic.FindSetCursor(_topic) && !IsNull(link)) {
editor.Select(editor.GetLength(), 0);
editor.GotoLabel(link);
if(!IsNull(create)) {
for(bool firstpass = true; firstpass; firstpass = false)
for(;;) {
int c = editor.GetCursor();
RichText::FormatInfo f = editor.GetFormatInfo();
if(f.styleid == BeginUuid() || (IsNull(f.label) || f.label == "noref") && !firstpass)
break;
editor.NextPara();
if(editor.GetCursor() == c)
break;
}
InsertNew(create);
}
}
}
void TopicEditor::FixTopic()
{
String nest;
if(!EditText(nest, "Fix topic", "Nest"))
return;
CppBase& base = CodeBase();
int q = base.Find(nest);
if(q < 0) {
Exclamation("Nest not found");
return;
}
Array<CppItem>& n = base[q];
Index<String> natural;
Vector<String> link;
for(int i = 0; i < n.GetCount(); i++) {
const CppItem& m = n[i];
String nat;
if(m.virt)
nat << "virtual ";
if(m.kind == CLASSFUNCTION || m.kind == CLASSFUNCTIONTEMPLATE)
nat << "static ";
nat << m.natural;
natural.Add(nat);
link.Add(MakeCodeRef(nest, n[i].qitem));
}
RichText result;
const RichText& txt = editor.Get();
bool started = false;
int l, h;
if(editor.GetSelection(l, h)) {
l = txt.FindPart(l);
h = txt.FindPart(h);
}
else {
l = 0;
h = txt.GetPartCount();
}
for(int i = 0; i < txt.GetPartCount(); i++)
if(txt.IsPara(i)) {
RichPara p = txt.Get(i);
if(i >= l && i < h) {
WString h = p.GetText();
String nat;
const wchar *s = h;
while(*s)
if(*s == 160 || *s == ' ') {
nat.Cat(' ');
while(*s == 160 || *s == ' ') s++;
}
else
nat.Cat(*s++);
int q = natural.Find(nat);
if(q >= 0) {
started = true;
const CppItem& m = n[q];
RichText h = ParseQTF(styles + ("[s7; &]" + CreateQtf(link[q], n[q].name, m, true)));
if(h.GetPartCount())
h.RemovePart(h.GetPartCount() - 1);
result.CatPick(h);
}
else
if(!started || p.GetLength())
result.Cat(p);
}
else
result.Cat(p);
}
else {
RichTable b;
b <<= txt.GetTable(i);
result.CatPick(b);
}
RichPara empty;
result.Cat(empty);
editor.BeginOp();
editor.SetSelection(0, txt.GetLength());
editor.PasteText(result);
}
String TopicEditor::GetFileName() const
{
return grouppath;
}
void TopicEditor::Save()
{
SaveTopic();
SaveInc();
}
void TopicEditor::SetFocus()
{
if(editor.IsEnabled())
editor.SetFocus();
else
Ctrl::SetFocus();
}
#include "Browser.h"
#define CODEITEM "37138531426314131252341829483370"
#define STRUCTITEM "37138531426314131252341829483380"
#define BEGINSTYLE "05600065144404261032431302351956"
#define ENDSTYLE "96390100711032703541132217272105"
static const char styles[] =
"[ $$0,0#00000000000000000000000000000000:Default]"
"[i448;a25;kKO9;2 $$1,0#" CODEITEM ":codeitem]"
"[i448;a25;kKO9;3 $$2,0#" STRUCTITEM ":structitem]"
"[l288;2 $$3,0#27521748481378242620020725143825:desc]"
"[H6;0 $$4,0#" BEGINSTYLE ":begin]"
"[l288;a25;kK~~~.1408;@3;2 $$5,0#61217621437177404841962893300719:param]"
"[0 $$7,0#" ENDSTYLE ":end]"
;
void TopicEditor::JumpToDefinition()
{
PostCallback(callback1(IdeGotoCodeRef, editor.GetFormatInfo().label));
}
void TopicEditor::Label(String& label)
{
Save();
if(ref.item.IsMultiSelect())
ref.item.ClearSelection();
ref.item.MultiSelect(false);
ref.Title("Reference");
ref.Set(label);
ref.classlist.Hide();
if(ref.Execute() != IDOK)
return;
label = ref.Get();
}
Uuid CodeItemUuid()
{
return ScanUuid(CODEITEM);
}
Uuid StructItemUuid()
{
return ScanUuid(STRUCTITEM);
}
Uuid BeginUuid()
{
return ScanUuid(BEGINSTYLE);
}
Uuid EndUuid()
{
static Uuid u = ScanUuid(ENDSTYLE);
return u;
}
void TopicEditor::FindBrokenRef()
{
Uuid codeitem = CodeItemUuid();
Uuid stritem = StructItemUuid();;
for(;;) {
if(IsNull(topicpath))
return;
const RichText& txt = editor.Get();
int c = editor.GetCursor();
int i = txt.FindPart(c);
while(++i < txt.GetPartCount()) {
if(txt.IsPara(i)) {
Uuid style = txt.GetParaStyle(i);
if(style == codeitem || style == stritem) {
RichPara para = txt.Get(i);
if(para.format.label == "noref")
continue;
if(!IsNull(para.format.label) && GetCodeRefItem(para.format.label))
continue;
editor.Move(txt.GetPartPos(i));
return;
}
}
}
if(!topic.IsCursor())
break;
c = topic.GetCursor() + 1;
if(c >= topic.GetCount()) {
PromptOK("No more invalid references.");
break;
}
topic.SetCursor(c);
if(!IsNull(topicpath))
editor.Move(0);
}
}
void TopicEditor::Tools(Bar& bar)
{
bar.Add("Insert code item..", IdeCommonImg::InsertItem(), THISBACK(InsertItem))
.Key(K_CTRL_INSERT);
String l = editor.GetFormatInfo().label;
bool b = l.GetCount() > 2 && l != "noref";
bar.Add(b, "See referenced code", IdeCommonImg::Source(), THISBACK(JumpToDefinition))
.Key(K_ALT_J);
bar.Add("Find broken references..", IdeCommonImg::FindBrokenRef(), THISBACK(FindBrokenRef))
.Key(K_CTRL_F3);
#ifdef REPAIR
bar.Separator();
bar.Add("Repair!", CtrlImg::Toggle(), THISBACK(Repair)).Key(K_ALT_F5);
bar.Separator();
#endif
}
void TopicEditor::MainTool(Bar& bar)
{
editor.StyleTool(bar);
bar.Gap();
editor.FontTools(bar);
bar.Gap();
editor.InkTool(bar);
editor.PaperTool(bar);
bar.Gap();
editor.LanguageTool(bar);
editor.SpellCheckTool(bar);
bar.Gap();
editor.IndexEntryTool(bar);
bar.Break();
editor.HyperlinkTool(bar, 300, K_CTRL_H);
bar.Gap();
editor.ParaTools(bar);
bar.Gap();
editor.EditTools(bar);
bar.Gap();
bar.Add("Print", CtrlImg::print(), THISBACK(Print))
.Key(K_CTRL_P);
bar.GapRight();
bar.Break();
editor.LabelTool(bar, 500, K_CTRL_M, "Code reference");
bar.Gap();
Tools(bar);
bar.Gap();
editor.TableTools(bar);
}
String NaturalDeQtf(const char *s) {
StringBuffer r;
r.Reserve(256);
bool cm = false;
while(*s) {
if(*s == ' ')
r.Cat(cm ? ' ' : '_');
else {
if((byte)*s > ' ' && !IsDigit(*s) && !IsAlpha(*s) && (byte)*s < 128)
r.Cat('`');
r.Cat(*s);
if(*s == ',')
cm = true;
else
cm = false;
}
s++;
}
return r;
}
static int sSplitT(int c) {
return c == ';' || c == '<' || c == '>' || c == ',';
}
bool IsCodeRefType(const String& type)
{
if(type.GetCount() == 0)
return false;
return CodeBase().Find(type) >= 0;
}
String DecoratedItem(const String& name, const CppItem& m, const char *natural)
{
String qtf = "[%00-00K ";
Vector<ItemTextPart> n = ParseItemNatural(name, m, natural);
if(m.virt)
qtf << "[@B virtual] ";
if(m.kind == CLASSFUNCTION || m.kind == CLASSFUNCTIONTEMPLATE)
qtf << "[@B static] ";
Vector<String> qt = Split(m.qptype, sSplitT, false);
Vector<String> tt = Split(m.qtype, sSplitT, false);
for(int i = 0; i < n.GetCount(); i++) {
ItemTextPart& p = n[i];
qtf << "[";
switch(p.type) {
case ITEM_PNAME:
qtf << "*";
case ITEM_NUMBER:
qtf << "@r";
break;
case ITEM_TNAME:
qtf << "*@g";
break;
case ITEM_NAME:
qtf << "*";
break;
case ITEM_UPP:
qtf << "@c";
break;
case ITEM_CPP_TYPE:
case ITEM_CPP:
qtf << "@B";
break;
default:
int q = p.type - ITEM_PTYPE;
if(q >= 0 && q < qt.GetCount() && IsCodeRefType(qt[q]))
qtf << "_^" << qt[q] << '^';
q = p.type - ITEM_TYPE;
if(q >= 0 && q < tt.GetCount() && IsCodeRefType(tt[q]))
qtf << "_^" << tt[q] << '^';
break;
}
qtf << ' ';
qtf << NaturalDeQtf(String(~m.natural + p.pos, p.len));
qtf << ']';
}
return qtf + "]";
}
String TopicEditor::CreateQtf(const String& item, const String& name, const CppItem& m, bool onlyhdr)
{
String qtf;
bool str = m.kind == STRUCT || m.kind == STRUCTTEMPLATE;
if(!str)
qtf << "[s4 &]";
String st = str ? "[s2;" : "[s1;";
String k = st + ':' + DeQtf(item) + ": ";
if(m.IsTemplate() && str) {
int q = 0;
int w = 0;
while(q < m.natural.GetLength()) {
if(m.natural[q] == '<')
w++;
if(m.natural[q] == '>') {
w--;
if(w == 0) {
q++;
break;
}
}
q++;
}
qtf << "[s2:noref: " << DecoratedItem(name, m, m.natural.Mid(0, q)) << "&][s2 " << k;
if(q < m.natural.GetLength()) {
while((byte)m.natural[q] <= 32)
q++;
qtf << DecoratedItem(name, m, m.natural.Mid(q));
}
}
else
qtf << k << DecoratedItem(name, m, m.natural);
qtf << "&]";
if(onlyhdr)
return qtf;
qtf << "[s3%% ";
String d;
Vector<String> t = Split(m.tname, ';');
for(int i = 0; i < t.GetCount(); i++) {
if(i)
d << ' ';
d << "[%-*@g " << DeQtf(t[i]) << "]";
}
d.Clear();
d = "[%% ";
Vector<String> p = Split(m.pname, ';');
bool was = false;
if(!str)
for(int i = 0; i < p.GetCount(); i++)
d << " [%-*@r " << DeQtf(p[i]) << "]";
if(!str && p.GetCount())
qtf << d << '.';
qtf << "&]";
qtf << "[s7 &]";
return qtf;
}
void TopicEditor::InsertItem()
{
if(IsNull(topicpath))
return;
Save();
ref.Title("Insert");
if(ref.item.IsCursor())
ref.item.SetFocus();
ref.item.MultiSelect();
ref.classlist.Show();
int c = ref.Execute();
if(c == IDCANCEL)
return;
if(c == IDYES) {
String qtf = "&{{1 ";
bool next = false;
for(int i = 0; i < ref.scope.GetCount(); i++) {
String s = ref.scope.Get(i, 1);
if(*s != '<') {
if(next)
qtf << ":: ";
qtf << DeQtf(s);
next = true;
}
}
qtf << "}}&";
editor.PasteText(ParseQTF(qtf));
return;
}
String qtf;
if(ref.item.IsSelection()) {
for(int i = 0; i < ref.item.GetCount(); i++)
if(ref.item.IsSelected(i)) {
const CppItemInfo& m = ref.GetItemInfo(i);
qtf << CreateQtf(ref.GetCodeRef(i), m.name, m);
}
}
else
if(ref.item.IsCursor()) {
const CppItemInfo& m = ref.GetItemInfo();
qtf << CreateQtf(ref.GetCodeRef(), m.name, m);
}
else
return;
editor.BeginOp();
editor.PasteText(ParseQTF(styles + qtf));
editor.PrevPara();
editor.PrevPara();
}
void TopicEditor::InsertNew(const String& coderef)
{
const CppItem *m = GetCodeRefItem(coderef);
if(!m)
return;
editor.BeginOp();
editor.PasteText(ParseQTF(styles + CreateQtf(coderef, m->name, *m)));
editor.PrevPara();
editor.PrevPara();
}
void TopicEditor::GoTo(const String& _topic, const String& link, const String& create)
{
if(topic.FindSetCursor(_topic) && !IsNull(link)) {
editor.Select(editor.GetLength(), 0);
editor.GotoLabel(link);
if(!IsNull(create)) {
for(bool firstpass = true; firstpass; firstpass = false)
for(;;) {
int c = editor.GetCursor();
RichText::FormatInfo f = editor.GetFormatInfo();
if(f.styleid == BeginUuid() || (IsNull(f.label) || f.label == "noref") && !firstpass)
break;
editor.NextPara();
if(editor.GetCursor() == c)
break;
}
InsertNew(create);
}
}
}
void TopicEditor::FixTopic()
{
String nest;
if(!EditText(nest, "Fix topic", "Nest"))
return;
CppBase& base = CodeBase();
int q = base.Find(nest);
if(q < 0) {
Exclamation("Nest not found");
return;
}
Array<CppItem>& n = base[q];
Index<String> natural;
Vector<String> link;
for(int i = 0; i < n.GetCount(); i++) {
const CppItem& m = n[i];
String nat;
if(m.virt)
nat << "virtual ";
if(m.kind == CLASSFUNCTION || m.kind == CLASSFUNCTIONTEMPLATE)
nat << "static ";
nat << m.natural;
natural.Add(nat);
link.Add(MakeCodeRef(nest, n[i].qitem));
}
RichText result;
const RichText& txt = editor.Get();
bool started = false;
int l, h;
if(editor.GetSelection(l, h)) {
l = txt.FindPart(l);
h = txt.FindPart(h);
}
else {
l = 0;
h = txt.GetPartCount();
}
for(int i = 0; i < txt.GetPartCount(); i++)
if(txt.IsPara(i)) {
RichPara p = txt.Get(i);
if(i >= l && i < h) {
WString h = p.GetText();
String nat;
const wchar *s = h;
while(*s)
if(*s == 160 || *s == ' ') {
nat.Cat(' ');
while(*s == 160 || *s == ' ') s++;
}
else
nat.Cat(*s++);
int q = nat.GetCount() ? natural.Find(nat) : -1;
if(q >= 0) {
started = true;
const CppItem& m = n[q];
RichText h = ParseQTF(styles + ("[s7; &]" + CreateQtf(link[q], n[q].name, m, true)));
if(h.GetPartCount())
h.RemovePart(h.GetPartCount() - 1);
result.CatPick(h);
}
else
if(!started || p.GetLength())
result.Cat(p);
}
else
result.Cat(p);
}
else {
RichTable b;
b <<= txt.GetTable(i);
result.CatPick(b);
}
RichPara empty;
result.Cat(empty);
editor.BeginOp();
editor.SetSelection(0, txt.GetLength());
editor.PasteText(result);
}
String TopicEditor::GetFileName() const
{
return grouppath;
}
void TopicEditor::Save()
{
SaveTopic();
SaveInc();
}
void TopicEditor::SetFocus()
{
if(editor.IsEnabled())
editor.SetFocus();
else
Ctrl::SetFocus();
}

View file

@ -4,7 +4,7 @@
#include "ide\Common/init"
#include "PdfDraw/init"
#include "RichEdit/init"
#define BLITZ_INDEX__ F77B1EB47EF25403A377CC1E2E5A06264
#define BLITZ_INDEX__ F85DF9C95A76CA3576D27A3E33F57D4BB
#include "TopicI.icpp"
#undef BLITZ_INDEX__
#endif