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 » Menus&Toolbars » Bold menu items [FEATURE REQUEST]
Bold menu items [FEATURE REQUEST] [message #41742] Wed, 15 January 2014 10:16 Go to next message
Tom1
Messages: 659
Registered: March 2007
Contributor
Hi Mirek,

I have implemented Bold(bool) member function for creating bold menu items. These are many times used for denoting the default double-click action of the object, e.g. in Windows.

The following changes are required in CtrlLib:

In MenuImp.h add:

class MenuItemBase : public Ctrl, public Bar::Item
{
public:

        ...

	virtual Bar::Item& Bold(bool bold = true); // Add this


In MenuItem.cpp add:

Bar::Item& MenuItemBase::Bold(bool bold)
{
	font.Bold(bold);
	return *this;
}



In Bar.h add:

class Bar : public Ctrl {
public:
	struct Item {

                ...

		virtual Item& Bold(bool bold = true); // Add this



In Bar.cpp add:

Bar::Item& Bar::Item::Bold(bool bold)               { return *this; }



Please apply these changes to upp.

Best regards,

Tom
Re: Bold menu items [FEATURE REQUEST] [message #41759 is a reply to message #41742] Fri, 17 January 2014 13:10 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
Thanks, makes sense, applied.

Mirek
Previous Topic: [Minor fix - Linux] Insufficient value for the variable leftgap in MenuBar CH_STYLE.
Next Topic: Floating context menu
Goto Forum:
  


Current Time: Mon Nov 18 07:24:28 CET 2019

Total time taken to generate the page: 0.01435 seconds