Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » FIXES/ADDS: CtrlLib: properties getters
Re: FIXES/ADDS: CtrlLib: properties getters [message #31949 is a reply to message #31940] Sun, 10 April 2011 18:04 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
good work with the NotNull..a lot cleaner than my version.

just a question aside:
some of the things in patch are missing

Pusher
	bool     IsClickFocus() const { return clickfocus; }


SpinButton
	bool         IsVisible() const { return visible; }


EditCtrl.h / EditField
	bool       IsNoBackground() const        { return nobg; }
	bool       IsAlignRight() const          { return alignright; }


typedef EditMinMaxNotNull<int64, EditInt64>      EditInt64NotNull;


class EditIntNotNullSpin : public EditIntSpin
{
public:
	EditIntNotNullSpin(int inc = 1) : EditIntSpin(inc) { NotNull(); }
	EditIntNotNullSpin(int min, int max, int inc = 1) : EditIntSpin(min, max, inc) { NotNull(); }
};


//the EditInt64Spin and EditInt64NotNullSpin
class EditInt64Spin : public EditInt64 {
public:
	typedef EditInt64Spin CLASSNAME;
	virtual void MouseWheel(Point p, int zdelta, dword keyflags);
	virtual bool Key(dword key, int repcnt);

protected:
	SpinButtons sb;
	int64       inc;

	void   Inc();
	void   Dec();
	void   Init();

public:
	EditInt64Spin&  SetInc(int64 _inc)           { inc = _inc; return *this; }
	int64           GetInc() const               { return inc; }
	EditInt64Spin&  OnSides(bool b = true)       { sb.OnSides(b); return *this; }
	bool            IsOnSides() const            { return sb.IsOnSides(); } 

	EditInt64Spin&  ShowSpin(bool s = true)      { sb.Show(s); return *this; }
	bool            IsShowSpin() const           { return sb.IsVisible(); }

	SpinButtons&    SpinButtonsObject()          { return sb; }
	const SpinButtons& SpinButtonsObject() const { return sb; }

	EditInt64Spin(int64 inc = 1);
	EditInt64Spin(int64 min, int64 max, int64 inc = 1);
	virtual ~EditInt64Spin();
};

class EditInt64NotNullSpin : public EditInt64Spin
{
public:
	EditInt64NotNullSpin(int inc = 1) : EditInt64Spin(inc) { NotNull(); }
	EditInt64NotNullSpin(int min, int max, int inc = 1) : EditInt64Spin(min, max, inc) { NotNull(); }
};


see here the
	bool            IsShowSpin() const           { return sb.IsVisible(); }

of the SpinButton exposure, as opposed to ShowSpin() in the Spin variants

BTW: why not have the
	EditInt64Spin(int64 inc = 1);
	EditInt64Spin(int64 min, int64 max, int64 inc = 1);


for the EditCtrl changes, see the attached files, just replace..

i think this one hasnt been in the patch..
ProgressInfo
	int   Get() const                           { return actual; }
	int   GetTotal() const                      { return total; }
  • Attachment: EditCtrl.h
    (Size: 15.28KB, Downloaded 382 times)
  • Attachment: EditField.cpp
    (Size: 24.01KB, Downloaded 292 times)

[Updated on: Sun, 10 April 2011 18:14]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XmlRpc Bugfixes
Next Topic: Printing a Layout
Goto Forum:
  


Current Time: Mon Apr 29 11:33:43 CEST 2024

Total time taken to generate the page: 0.02697 seconds