예제 #1
0
 public RichToolTip()
 {
     OwnerDraw = true;
     Popup += new PopupEventHandler(RichToolTip_Popup);
     Draw += new DrawToolTipEventHandler(RichToolTip_Draw);
     RtbPCtrl = new RichTextBoxPrintCtrl();
 }
예제 #2
0
        public HtmlToolTip()
        {
            OwnerDraw = true;

            Popup += new PopupEventHandler(HtmlToolTip_Popup);
            Draw += new DrawToolTipEventHandler(HtmlToolTip_Draw);
        }
예제 #3
0
파일: MetroToolTip.cs 프로젝트: narugo/Mist
        public MetroToolTip()
        {
            OwnerDraw = true;
            ShowAlways = true;

            Draw += new DrawToolTipEventHandler(MetroToolTip_Draw);
            Popup += new PopupEventHandler(MetroToolTip_Popup);
        }
예제 #4
0
        public MetroToolTip()
        {
            OwnerDraw  = true;
            ShowAlways = true;

            Draw  += new DrawToolTipEventHandler(MetroToolTip_Draw);
            Popup += new PopupEventHandler(MetroToolTip_Popup);
        }
예제 #5
0
 public ItemToolTip()
 {
     OwnerDraw = true;
     Popup += new PopupEventHandler(OnPopup);
     Draw += new DrawToolTipEventHandler(OnDraw);
     InitialDelay = 200;
     UseFading = false;
 }
예제 #6
0
        public PromptToolTip()
        {
            InitializeComponent();

            Font      = new Font("Microsoft Sans Serif", 8.25f);
            OwnerDraw = true;
            Draw     += new DrawToolTipEventHandler(this.OnDraw);
            Popup    += new PopupEventHandler(this.OnPopup);
        }
예제 #7
0
파일: ToolTip.cs 프로젝트: raj581/Marvin
            private void OnUnPopup(PopupEventArgs e)
            {
                PopupEventHandler eh = (PopupEventHandler)(Events [UnPopupEvent]);

                if (eh != null)
                {
                    eh(this, e);
                }
            }
예제 #8
0
파일: ToolTip.cs 프로젝트: raj581/Marvin
        internal void OnPopup(PopupEventArgs e)
        {
            PopupEventHandler eh = (PopupEventHandler)(Events [PopupEvent]);

            if (eh != null)
            {
                eh(this, e);
            }
        }
예제 #9
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// popupeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this PopupEventHandler popupeventhandler, Object sender, PopupEventArgs e, AsyncCallback callback)
        {
            if (popupeventhandler == null)
            {
                throw new ArgumentNullException("popupeventhandler");
            }

            return(popupeventhandler.BeginInvoke(sender, e, callback, null));
        }
예제 #10
0
		public ColorToolTip() {
			OwnerDraw = true;

			TooltipPadding = new Padding(0, 0, 4, 4);
			ForeFont = new Font("Tahoma", 9);
			ForeFontBold = new Font("Tahoma", 9, FontStyle.Bold);

			Draw += new DrawToolTipEventHandler(ColorToolTip_Draw);
			Popup += new PopupEventHandler(ColorToolTip_Popup);
		}
예제 #11
0
 // Dispose method, moved from the Designer.
 protected override void Dispose(bool disposing)
 {
     if (!disposed)
     {
         Popup -= new PopupEventHandler(OnPopup);
         Draw -= new DrawToolTipEventHandler(OnDraw);
     }
     disposed = true;
     base.Dispose(disposing);
 }
예제 #12
0
        public MinimalToolTip()
        {
            OwnerDraw   = true;
            ForeColor   = Color.Black;
            BackColor   = Color.Gainsboro;
            BorderColor = SystemColors.ControlDark;
            Font        = new Font("Segoe UI", 8F, FontStyle.Bold);

            Popup += new PopupEventHandler(OnPopup);
            Draw  += new DrawToolTipEventHandler(OnDraw);
        }
예제 #13
0
        public ColorToolTip()
        {
            OwnerDraw = true;

            TooltipPadding = new Padding(0, 0, 4, 4);
            ForeFont       = new Font("Tahoma", 9);
            ForeFontBold   = new Font("Tahoma", 9, FontStyle.Bold);

            Draw  += new DrawToolTipEventHandler(ColorToolTip_Draw);
            Popup += new PopupEventHandler(ColorToolTip_Popup);
        }
예제 #14
0
            internal virtual void OnPopup(PopupEventArgs e)
            {
                PopupEventHandler eh = (PopupEventHandler)(Events[PopupEvent]);

                if (eh != null)
                {
                    eh(this, e);
                }
                //else
                //	e.ToolTipSize = ThemeEngine.Current.ToolTipSize (this, Text);
            }
예제 #15
0
		public ItemToolTip() {
			OwnerDraw = true;
			Active = false;
			AutoPopDelay = 5000;
			InitialDelay = 0;
			ReshowDelay = 0;
			UseAnimation = false;
			UseFading = false;

			Draw += new DrawToolTipEventHandler( MobToolTip_Draw );
			Popup += new PopupEventHandler( MobToolTip_Popup );
		}
예제 #16
0
		public ColorToolTip() {
			OwnerDraw = true;

			mDrawFont = new Font( "Tahoma", 9 );

			mTimeout = new Timer();
			mTimeout.Interval = 100;
			mTimeout.Tick += new EventHandler( mTimeout_Tick );

			Draw += new DrawToolTipEventHandler( ColorToolTip_Draw );
			Popup += new PopupEventHandler( ColorToolTip_Popup );
		}
예제 #17
0
        public ItemToolTip()
        {
            OwnerDraw    = true;
            Active       = false;
            AutoPopDelay = 5000;
            InitialDelay = 0;
            ReshowDelay  = 0;
            UseAnimation = false;
            UseFading    = false;

            Draw  += new DrawToolTipEventHandler(MobToolTip_Draw);
            Popup += new PopupEventHandler(MobToolTip_Popup);
        }
예제 #18
0
        public ColorToolTip()
        {
            OwnerDraw = true;

            mDrawFont = new Font("Tahoma", 9);

            mTimeout          = new Timer();
            mTimeout.Interval = 100;
            mTimeout.Tick    += new EventHandler(mTimeout_Tick);

            Draw  += new DrawToolTipEventHandler(ColorToolTip_Draw);
            Popup += new PopupEventHandler(ColorToolTip_Popup);
        }
예제 #19
0
        // This constructor is required for the Windows Forms Designer to instantiate
        // an object of this class with New(Me.components).
        // To verify this, just remove this constructor. Build it and then put the
        // component on a form. Take a look at the Designer.vb file for InitializeComponents(),
        // and search for the line where it instantiates this class.
        public BetterToolTip(IContainer p_container)
            : base()
        {
            // Required for Windows.Forms Class Composition Designer support
            if (p_container != null)
            {
                p_container.Add(this);
            }

            // Suscribes to Popup event listener
            // Comment out following lines if you are okay with the same Title/Icon for disabled controls.
            this.m_EvtPopup = new PopupEventHandler(EnhancedToolTip_Popup);
            this.Popup += this.m_EvtPopup;
        }
예제 #20
0
        public ItemToolTip()
        {
            AutomaticDelay = 0;
            AutoPopDelay   = 0;
            Draw          += new DrawToolTipEventHandler(ItemToolTip_Draw);
            InitialDelay   = 0;
            OwnerDraw      = true;
            Popup         += new PopupEventHandler(ItemToolTip_Popup);
            ReshowDelay    = 0;
            UseAnimation   = true;
            UseFading      = true;
            LoadGraphicsObjects();

            ItemCache.Instance.ItemsChanged += new EventHandler(CharacterItemCache_ItemsChanged);
        }
예제 #21
0
        private void Init()
        {
            if (TheApp.app.DesignMode)
            {
                return;
            }

            OwnerDraw = true;
            Draw     += new DrawToolTipEventHandler(OnDraw);
            Popup    += new PopupEventHandler(OnPopup);

            // デフォルトで、このクラスは設定されているフォントにしておく。
            Font = TheApp.app.Config.FontManager.ToolTip.CreateFont();

            //Debug.Assert(Font != null);
        }
예제 #22
0
        public CustomToolTip()
        {
            Font   = new Font("Palatino Linotype", 9.75f, FontStyle.Bold);
            Offset = 6;

            BackColor = Color.DarkRed;
            ForeColor = Color.Gold;

            OwnerDraw = true;
            UseFading = false;

            InitialDelay = 0;

            Popup += new PopupEventHandler(this.OnPopup);
            Draw  += new DrawToolTipEventHandler(this.OnDraw);
        }
예제 #23
0
        public DebeduToolTip()
        {
            try
            {
                OwnerDraw = true;

                myTextFormat.FormatFlags = StringFormatFlags.LineLimit;
                myTextFormat.Alignment = StringAlignment.Near;
                myTextFormat.LineAlignment = StringAlignment.Center;
                myTextFormat.Trimming = StringTrimming.None;

                Popup += new PopupEventHandler(CustomizedToolTip_PopUp);
                Draw += new DrawToolTipEventHandler(CustomizedToolTip_Draw);
            }
            catch (Exception ex)
            {
                string logMessage = "Exception in ToolTip()" + ex.ToString();
                Trace.TraceError(logMessage);
                throw;
            }
        }
예제 #24
0
파일: ToolTip.cs 프로젝트: raj581/Marvin
        public ToolTip()
        {
            // Defaults from MS
            is_active       = true;
            automatic_delay = 500;
            autopop_delay   = 5000;
            initial_delay   = 500;
            re_show_delay   = 100;
            show_always     = false;
            back_color      = SystemColors.Info;
            fore_color      = SystemColors.InfoText;

#if NET_2_0
            isBalloon       = false;
            stripAmpersands = false;
            useAnimation    = true;
            useFading       = true;
#endif
            tooltip_strings = new Hashtable(5);
            controls        = new ArrayList(5);

            tooltip_window             = new ToolTipWindow();
            tooltip_window.MouseLeave += new EventHandler(control_MouseLeave);
            tooltip_window.Draw       += new DrawToolTipEventHandler(tooltip_window_Draw);
            tooltip_window.Popup      += new PopupEventHandler(tooltip_window_Popup);

#if NET_2_0
            // UIA Framework: Static event handlers
            tooltip_window.UnPopup += delegate(object sender, PopupEventArgs args) {
                OnUnPopup(args);
            };
            UnPopup += new PopupEventHandler(OnUIAUnPopup);
#endif

            timer         = new Timer();
            timer.Enabled = false;
            timer.Tick   += new EventHandler(timer_Tick);
        }
예제 #25
0
		public MobToolTip() {
			OwnerDraw = true;
			Draw += new DrawToolTipEventHandler( MobToolTip_Draw );
			Popup += new PopupEventHandler( MobToolTip_Popup );
		}
예제 #26
0
 public PromptToolTip(IContainer Cont) : base(Cont)
 {
     OwnerDraw = true;
     Draw     += new DrawToolTipEventHandler(this.OnDraw);
     Popup    += new PopupEventHandler(this.OnPopup);
 }
예제 #27
0
 public MobToolTip()
 {
     OwnerDraw = true;
     Draw     += new DrawToolTipEventHandler(MobToolTip_Draw);
     Popup    += new PopupEventHandler(MobToolTip_Popup);
 }
예제 #28
0
        private ColorPicker InitToolbarColor(ref int x, int y, string t, PopupEventHandler peh)
		{
			// Create the font
            ColorPicker ctl = new ColorPicker();
			ctl.Width = 37;
			ctl.Left = x;
			ctl.Top = y;
			ctl.Tag = t;

			ToolTip tip = new ToolTip();
			tip.AutomaticDelay = 500;
			tip.ShowAlways = true;
			tip.SetToolTip(ctl, t);
            tip.Popup += peh;
			mainTB.Controls.Add(ctl);

			x += ctl.Width;
			return ctl;
		}
예제 #29
0
 public ImageTooltip() : base()
 {
     OwnerDraw = true;
     Popup    += new PopupEventHandler(OnPopup);
     Draw     += new DrawToolTipEventHandler(OnDraw);
 }
예제 #30
0
		public ToolTip() {

			// Defaults from MS
			is_active = true;
			automatic_delay = 500;
			autopop_delay = 5000;
			initial_delay = 500;
			re_show_delay = 100;
			show_always = false;
			back_color = SystemColors.Info;
			fore_color = SystemColors.InfoText;
			
			isBalloon = false;
			stripAmpersands = false;
			useAnimation = true;
			useFading = true;
			tooltip_strings = new Hashtable(5);
			controls = new ArrayList(5);

			tooltip_window = new ToolTipWindow();
			tooltip_window.MouseLeave += new EventHandler(control_MouseLeave);
			tooltip_window.Draw += new DrawToolTipEventHandler (tooltip_window_Draw);
			tooltip_window.Popup += new PopupEventHandler (tooltip_window_Popup);

			// UIA Framework: Static event handlers
			tooltip_window.UnPopup += delegate (object sender, PopupEventArgs args) {
				OnUnPopup (args);
			};
			UnPopup += new PopupEventHandler (OnUIAUnPopup);

			timer = new Timer();
			timer.Enabled = false;
			timer.Tick +=new EventHandler(timer_Tick);

		}
예제 #31
0
        private void InitialiseMouseController()
        {
            m_mouseController     = new MouseController <TNode>(Colors, Redraw, shift => Shift(shift), (screen) => ScrollIfRequired(screen), (p, z) => Zoom(p, z), () => new ZOrderedQuadTree <TNode>(SpatiallyOrderedNodes, CurrentFile.RelativePosition), () => new Fake <UnorderedTuple2 <Output> >(SpatiallyOrderedConnections.Select(a => a.Item1)), () => CurrentFile.Groups, MyEdit, n => CurrentFile.Remove(n.Only(), Enumerable.Empty <NodeGroup>(), m_localization), Snap, SnapGroup, UIInfo, id => CurrentFile.GetNode(id));
            drawWindow.MouseDown += (a, args) => m_mouseController.MouseDown(DrawWindowToGraphSpace(args.Location), args.Location, args.Button);
            drawWindow.MouseUp   += (a, args) => m_mouseController.MouseUp(DrawWindowToGraphSpace(args.Location), args.Location, args.Button);
            drawWindow.MouseMove += (a, args) =>
            {
                m_mouseController.MouseMove(DrawWindowToGraphSpace(args.Location), args.Location);
            };
            drawWindow.MouseDoubleClick    += (a, args) => m_mouseController.MouseDoubleClick(DrawWindowToGraphSpace(args.Location), args.Button);
            drawWindow.MouseWheel          += (a, args) => m_mouseController.MouseWheel(DrawWindowToGraphSpace(args.Location), args, Control.ModifierKeys);
            drawWindow.MouseCaptureChanged += (a, args) => m_mouseController.MouseCaptureChanged();

            m_mouseController.Changed          += (a) => { CurrentFile.UndoableFile.Change(a); ResizeDocument(); };
            m_mouseController.SelectionChanged += Redraw;

            m_mouseController.PlainClick += (p) =>
            {
                if (m_keyMapping[m_keyHeld] != null)
                {
                    AddNode(m_keyMapping[m_keyHeld], p);
                }
            };

            m_mouseController.SelectionChanged += () => m_conversation.BringToFront(Selected);

            drawWindow.KeyDown += (o, k) =>
            {
                m_mouseController.KeyHeld = m_keyMapping.ContainsKey(k.KeyCode) ? k.KeyCode : (Keys?)null;
                m_keyHeld = k.KeyCode;
                if (k.KeyCode.IsSet(Keys.ShiftKey))
                {
                    Redraw();
                }
            };
            drawWindow.KeyUp += (o, k) =>
            {
                m_mouseController.KeyHeld = null;
                if (k.KeyCode.IsSet(Keys.ShiftKey))
                {
                    Redraw();
                }
            };
            drawWindow.LostFocus += (o, e) => m_mouseController.KeyHeld = null;

            m_mouseController.StateChanged += () =>
            {
                drawWindow.Cursor = m_mouseController.m_state.Cursor;
            };

            m_mouseController.HoverNodeChanged += () =>
            {
                if (m_mouseController.HoverNode != null)
                {
                    if (ShowIds)
                    {
                        m_toolTip.Active = true;
                        m_toolTip.SetToolTip(drawWindow, m_mouseController.HoverNode.Data.NodeId.Serialized());
                        m_toolTip.OwnerDraw = false;
                    }
                    else
                    {
                        m_toolTip.OwnerDraw = true;
                        var        node     = m_mouseController.HoverNode as ConversationNode <INodeGui>;
                        EditableUI renderer = new EditableUI(node, new PointF(0, 0), m_localization.Localize);
                        renderer.UpdateArea();
                        ToolTipPopup = (sender, e) => { e.ToolTipSize = renderer.Area.Size.ToSize(); };
                        DrawToolTip  = (sender, e) =>
                        {
                            using (var m = new Matrix())
                            {
                                m.Translate(renderer.Area.Width / 2, renderer.Area.Height / 2);
                                e.Graphics.Transform = m;
                            }
                            renderer.Draw(e.Graphics, false, m_colorScheme);
                        };
                        m_toolTip.SetToolTip(drawWindow, m_mouseController.HoverNode.Data.NodeId.Serialized());
                        m_toolTip.Active = true;
                    }
                }
                else
                {
                    m_toolTip.Active = false;
                    m_toolTip.SetToolTip(drawWindow, null);
                }
            };
        }