Ecere SDK/eC Forums • View topic - Something in eNotepad example

Ecere SDK/eC Forums

Ecere Developers Community

Something in eNotepad example

General help with the Ecere Cross Platform GUI toolkit: Window, common controls, events, etc.
Help with the 2D Graphics library: Surface, Display, Bitmap, Font and others.

Something in eNotepad example

Postby samsam598 » Thu Oct 17, 2013 1:51 am

Given below code:
Code: Select all
Menu fileMenu { menu, "File", f };

At the place both menu and f has not defined but how come they are ready to use?I am a bit confused to the construction of the Menu system in eC.
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: Something in eNotepad example

Postby jerome » Thu Oct 17, 2013 4:20 pm

Hi Sam,

First this is equivalent to:

Code: Select all
Menu fileMenu { parent = menu, text = "File", hotKey = f };

Then 'menu' here if this is inside a Window class would refer to the Window::menu property of that class, which is automatically initialized when you set hasMenuBar = true.

'f' in this case is an enumeration value from KeyCode which can be converted to the data type of the Window::hotKey property (Key).

Hope this helps :)

Site Admin
Posts: 623
Joined: Sat Jan 16, 2010 11:16 pm

Return to GUI Toolkit & 2D Graphics

Who is online

Users browsing this forum: No registered users and 3 guests