EnglishРусский  

   ..

   addustr.g

   app.g

   btn.g

   btnpic.g

   comp.g

   ctrl.g

   dialogs.g

   edit.g

   events.g

   fonts.g

   form.g

   gray.g

   grey.g

   images.g

   label.g

   labeled.g

   locustr.g

   menu.g

   panel.g

   picture.g

   popupmenu.g

   s.txt

   styles.g

   tab.g

   tabitem.g

   tabpage.g

   toolbar.g

   tray.g

   url.g

   vis.g

   viswin.g

Ads

Perfect Automation tool
All-In-One: Script editor, Launcher, Scheduler, Keyboard & Mouse Recorder. Try now!

CreateInstall
Freeware and commercial installers.

Cell Phone Batteries
Batteries Plus offers batteries for laptop, camcorder, cell phone, camera.

Gentee needs your help!
How to advertise with us
 
laptop battery

source\lib\vis\popupmenu.g
 1 /******************************************************************************
 2 *
 3 * Copyright (C) 2004-2007, The Gentee Group. All rights reserved. 
 4 * This file is part of the Gentee open source project - http://www.gentee.com. 
 5 * 
 6 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE GENTEE LICENSE ("AGREEMENT"). 
 7 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS 
 8 * ACCEPTANCE OF THE AGREEMENT.
 9 *
10 * ID: vis.popupmenu 19.07.07 0.0.A.
11 *
12 * Author: Alexander Krivonogov ( gentee )
13 *
14 ******************************************************************************/
15 
16 include {
17    "menu.g"
18 }
19 
20 /* Компонента vPopupMenu, порождена от vCustomMenu, может содержать vMenuItem   
21 */
22 type vPopupMenu <inherit = vCustomMainMenu> {   
23 }
24 
25 /*------------------------------------------------------------------------------
26    Public methods
27 */
28 
29 /*Метод vPopupMenu.Show( int x, y )
30 Открыть всплывающе меню
31 x, y - координаты экрана где открыть всплывающее меню
32 */
33 method vPopupMenu.Show( int x, y )
34 {  
35    TrackPopupMenuEx( .phMenu, $TPM_LEFTALIGN | $TPM_TOPALIGN , x, y, 
36          .Owner->vForm.hwnd, 0 )
37 }
38 
39 /*Метод vPopupMenu.Show( )
40 Открыть всплывающе меню, меню откроется рядом с курсором мыши
41 */
42 method vPopupMenu.Show( )
43 {     
44    POINT p
45    GetCursorPos( p )
46    .Show( p.x, p.y )
47 }
48 
49 /*------------------------------------------------------------------------------
50    Virtual methods
51 */
52 
53 method vPopupMenu.mSetOwner <alias = vPopupMenu_mSetOwner> ( vComp owner )
54 {     
55    if owner && owner.TypeIs( vForm )
56    { 
57       this.pOwner = &owner    
58    }    
59 }
60 
61 /*------------------------------------------------------------------------------
62    Registration
63 */
64 method vPopupMenu vPopupMenu.init( )
65 {
66    this.pTypeId = vPopupMenu   
67    this.phMenu = CreatePopupMenu()    
68    return this 
69 }  
70 
71 func init_vPopupMenu <entry>()
72 {   
73    regcomp( vPopupMenu, "vPopupMenu", vCustomMenu, $vComp_last,
74       %{ %{$mSetOwner,     vPopupMenu_mSetOwner }
75       },
76       0->collection )          
77       
78 ifdef $DESIGNING {
79    cm.AddComp( vPopupMenu, 1, "Windows", "popupmenu" )
80 }                                                      
81 }
82 
Edit