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 previous message
Tom1
Messages: 1212
Registered: March 2007
Senior 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
 
Read Message
Read Message
Previous Topic: [Minor fix - Linux] Insufficient value for the variable leftgap in MenuBar CH_STYLE.
Next Topic: Floating context menu
Goto Forum:
  


Current Time: Fri Mar 29 14:53:24 CET 2024

Total time taken to generate the page: 0.01533 seconds