Home » U++ Library support » Splitter » Why Splitter::GetChildCount() is not public???- GetCount [SOLVED]
|
|
|
Re: Why Splitter::GetChildCount() is not public??? [message #1961 is a reply to message #1959] |
Tue, 28 March 2006 23:34   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Tue, 28 March 2006 20:31 |
fudadmin wrote on Tue, 28 March 2006 13:18 |
fudadmin wrote on Tue, 28 March 2006 18:11 | Why Splitter::GetChildCount() is not public???
|
and PosToClient()...
|
Well, over time I have found "keep the interface minimal" a good practice. Sometimes I am wrong about interface, but enriching it is quite easy thing. But the opposite, removing stuff from interface, is much more dangerous bussines (angry users... .
Mirek
|
The users are angry when they find inconsistant interfaces - in some Ctrl's the same methods are public, in some - not. It looks like I will have to maintain my own version of Ultimate++...
|
|
|
Re: Why Splitter::GetChildCount() is not public??? [message #1963 is a reply to message #1961] |
Tue, 28 March 2006 23:54   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
fudadmin wrote on Tue, 28 March 2006 16:34 |
luzr wrote on Tue, 28 March 2006 20:31 |
fudadmin wrote on Tue, 28 March 2006 13:18 |
fudadmin wrote on Tue, 28 March 2006 18:11 | Why Splitter::GetChildCount() is not public???
|
and PosToClient()...
|
Well, over time I have found "keep the interface minimal" a good practice. Sometimes I am wrong about interface, but enriching it is quite easy thing. But the opposite, removing stuff from interface, is much more dangerous bussines (angry users... .
Mirek
|
The users are angry when they find inconsistant interfaces - in some Ctrl's the same methods are public, in some - not. It looks like I will have to maintain my own version of Ultimate++...
|
PosToClient nor GetChildCount is not common public interface....
Mirek
|
|
|
Re: Why Splitter::GetChildCount() is not public??? [message #1965 is a reply to message #1963] |
Wed, 29 March 2006 00:45   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Tue, 28 March 2006 22:54 |
fudadmin wrote on Tue, 28 March 2006 16:34 |
luzr wrote on Tue, 28 March 2006 20:31 |
fudadmin wrote on Tue, 28 March 2006 13:18 |
fudadmin wrote on Tue, 28 March 2006 18:11 | Why Splitter::GetChildCount() is not public???
|
and PosToClient()...
|
Well, over time I have found "keep the interface minimal" a good practice. Sometimes I am wrong about interface, but enriching it is quite easy thing. But the opposite, removing stuff from interface, is much more dangerous bussines (angry users... .
Mirek
|
The users are angry when they find inconsistant interfaces - in some Ctrl's the same methods are public, in some - not. It looks like I will have to maintain my own version of Ultimate++...
|
PosToClient nor GetChildCount is not common public interface....
Mirek
|
Originally I meant only count of children. In HeaderCtrl you can have GetCount() which is a number of children? Why all similar controls can't have the same?
Regarding private interfaces - this is where I completely agree with Lisp and Assembler advocates - "C++ was created for stupid programmers"...
P.S
On the other hand Fox-toolkit is not afraid to make public this kind of methods
/// Return true if specified window is owned by this window
FXbool isOwnerOf(const FXWindow* window) const;
/// Return true if specified window is ancestor of this window
FXbool isChildOf(const FXWindow* window) const;
/// Return true if this window contains child in its subtree
FXbool containsChild(const FXWindow* child) const;
/// Return the child window at specified coordinates
FXWindow* getChildAt(FXint x,FXint y) const;
/// Return the number of child windows for this window
FXint numChildren() const;
/**
* Return the index (starting from zero) of the specified child window,
* or -1 if the window is not a child or NULL
*/
FXint indexOfChild(const FXWindow *window) const;
/**
* Return the child window at specified index,
* or NULL if the index is negative or out of range
*/
FXWindow* childAtIndex(FXint index) const;
/// Return the common ancestor of window a and window b
static FXWindow* commonAncestor(FXWindow* a,FXWindow* b);
[Updated on: Wed, 29 March 2006 00:55] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 19:10:27 CEST 2025
Total time taken to generate the page: 0.00602 seconds
|