~ubuntu-branches/ubuntu/quantal/gtkmm3.0/quantal

« back to all changes in this revision

Viewing changes to gtk/gtkmm/statusicon.h

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-03-01 23:42:36 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20120301234236-12w6m0hkomhi7h53
Tags: 3.3.16-0ubuntu1
* New upstream version
* debian/control.in: updated the glib requirement

Show diffs side-by-side

added added

removed removed

Lines of Context:
387
387
  
388
388
 
389
389
  /** Returns the current value of the has-tooltip property.
390
 
   * See Gtk::StatusIcon:has-tooltip for more information.
 
390
   * See Gtk::StatusIcon::property_has_tooltip() for more information.
391
391
   * 
392
392
   * @newin{2,16}
393
393
   * @return Current value of has-tooltip on @a status_icon.
395
395
  bool get_has_tooltip() const;
396
396
  
397
397
  /** Sets the has-tooltip property on @a status_icon to @a has_tooltip.
398
 
   * See Gtk::StatusIcon:has-tooltip for more information.
 
398
   * See Gtk::StatusIcon::property_has_tooltip() for more information.
399
399
   * 
400
400
   * @newin{2,16}
401
401
   * @param has_tooltip Whether or not @a status_icon has a tooltip.
412
412
  
413
413
  /** Sets @a text as the contents of the tooltip.
414
414
   * 
415
 
   * This function will take care of setting Gtk::StatusIcon:has-tooltip to
416
 
   * <tt>true</tt> and of the default handler for the Gtk::StatusIcon::query-tooltip
 
415
   * This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to
 
416
   * <tt>true</tt> and of the default handler for the Gtk::StatusIcon::signal_query_tooltip()
417
417
   * signal.
418
418
   * 
419
 
   * See also the Gtk::StatusIcon:tooltip-text property and
 
419
   * See also the Gtk::StatusIcon::property_tooltip_text() property and
420
420
   * Gtk::Tooltip::set_text().
421
421
   * 
422
422
   * @newin{2,16}
435
435
  /** Sets @a markup as the contents of the tooltip, which is marked up with
436
436
   * the Pango text markup language.
437
437
   * 
438
 
   * This function will take care of setting Gtk::StatusIcon:has-tooltip to <tt>true</tt>
439
 
   * and of the default handler for the Gtk::StatusIcon::query-tooltip signal.
 
438
   * This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to <tt>true</tt>
 
439
   * and of the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal.
440
440
   * 
441
 
   * See also the Gtk::StatusIcon:tooltip-markup property and
 
441
   * See also the Gtk::StatusIcon::property_tooltip_markup() property and
442
442
   * Gtk::Tooltip::set_markup().
443
443
   * 
444
444
   * @newin{2,16}
492
492
  guint32 get_x11_window_id() const;
493
493
 
494
494
  #ifdef GLIBMM_PROPERTIES_ENABLED
495
 
/** A GdkPixbuf to display.
 
495
/** 
496
496
   *
497
497
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
498
498
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
512
512
#endif //#GLIBMM_PROPERTIES_ENABLED
513
513
 
514
514
  #ifdef GLIBMM_PROPERTIES_ENABLED
515
 
/** Filename to load and display.
 
515
/** 
516
516
   *
517
517
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
518
518
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
523
523
 
524
524
 
525
525
  #ifdef GLIBMM_PROPERTIES_ENABLED
526
 
/** Stock ID for a stock image to display.
 
526
/** 
527
527
   *
528
528
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
529
529
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
543
543
#endif //#GLIBMM_PROPERTIES_ENABLED
544
544
 
545
545
  #ifdef GLIBMM_PROPERTIES_ENABLED
546
 
/** The name of the icon from the icon theme.
 
546
/** 
547
547
   *
548
548
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
549
549
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
563
563
#endif //#GLIBMM_PROPERTIES_ENABLED
564
564
 
565
565
  #ifdef GLIBMM_PROPERTIES_ENABLED
566
 
/** The GIcon being displayed.
 
566
/** 
567
567
   *
568
568
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
569
569
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
583
583
#endif //#GLIBMM_PROPERTIES_ENABLED
584
584
 
585
585
  #ifdef GLIBMM_PROPERTIES_ENABLED
586
 
/** The representation being used for image data.
 
586
/** 
587
587
   *
588
588
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
589
589
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
594
594
 
595
595
 
596
596
  #ifdef GLIBMM_PROPERTIES_ENABLED
597
 
/** The size of the icon.
 
597
/** 
598
598
   *
599
599
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
600
600
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
605
605
 
606
606
 
607
607
  #ifdef GLIBMM_PROPERTIES_ENABLED
608
 
/** The screen where this status icon will be displayed.
 
608
/** 
609
609
   *
610
610
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
611
611
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
625
625
#endif //#GLIBMM_PROPERTIES_ENABLED
626
626
 
627
627
  #ifdef GLIBMM_PROPERTIES_ENABLED
628
 
/** Whether the status icon is visible.
 
628
/** 
629
629
   *
630
630
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
631
631
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
645
645
#endif //#GLIBMM_PROPERTIES_ENABLED
646
646
 
647
647
  #ifdef GLIBMM_PROPERTIES_ENABLED
648
 
/** Whether the status icon is embedded.
 
648
/** 
649
649
   *
650
650
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
651
651
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
656
656
 
657
657
 
658
658
  #ifdef GLIBMM_PROPERTIES_ENABLED
659
 
/** The orientation of the tray.
 
659
/** 
660
660
   *
661
661
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
662
662
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
667
667
 
668
668
 
669
669
  #ifdef GLIBMM_PROPERTIES_ENABLED
670
 
/** Whether this tray icon has a tooltip.
 
670
/** 
671
671
   *
672
672
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
673
673
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
687
687
#endif //#GLIBMM_PROPERTIES_ENABLED
688
688
 
689
689
  #ifdef GLIBMM_PROPERTIES_ENABLED
690
 
/** The contents of the tooltip for this widget.
 
690
/** 
691
691
   *
692
692
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
693
693
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
707
707
#endif //#GLIBMM_PROPERTIES_ENABLED
708
708
 
709
709
  #ifdef GLIBMM_PROPERTIES_ENABLED
710
 
/** The contents of the tooltip for this tray icon.
 
710
/** 
711
711
   *
712
712
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
713
713
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
727
727
#endif //#GLIBMM_PROPERTIES_ENABLED
728
728
 
729
729
  #ifdef GLIBMM_PROPERTIES_ENABLED
730
 
/** The title of this tray icon.
 
730
/** 
731
731
   *
732
732
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
733
733
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
748
748
 
749
749
 
750
750
  /**
751
 
   * @par Prototype:
 
751
   * @par Slot Prototype:
752
752
   * <tt>bool on_my_%size_changed(int size)</tt>
 
753
   *
 
754
   * Gets emitted when the size available for the image
 
755
   * changes, e.g.\ because the notification area got resized.
 
756
   * 
 
757
   * @newin{2,10}
 
758
   * @param size The new size.
 
759
   * @return <tt>true</tt> if the icon was updated for the new
 
760
   * size. Otherwise, GTK+ will scale the icon as necessary.
753
761
   */
754
762
 
 
763
 
755
764
  Glib::SignalProxy1< bool,int > signal_size_changed();
756
765
 
757
766
 
758
767
  /**
759
 
   * @par Prototype:
 
768
   * @par Slot Prototype:
760
769
   * <tt>void on_my_%activate()</tt>
 
770
   *
 
771
   * Gets emitted when the user activates the status icon. 
 
772
   * If and how status icons can activated is platform-dependent.
 
773
   * 
 
774
   * Unlike most G_SIGNAL_ACTION signals, this signal is meant to 
 
775
   * be used by applications and should be wrapped by language bindings.
 
776
   * 
 
777
   * @newin{2,10}
761
778
   */
762
779
 
 
780
 
763
781
  Glib::SignalProxy0< void > signal_activate();
764
782
 
765
783
  
766
784
  /**
767
 
   * @par Prototype:
 
785
   * @par Slot Prototype:
768
786
   * <tt>void on_my_%popup_menu(guint button, guint32 activate_time)</tt>
 
787
   *
 
788
   * Gets emitted when the user brings up the context menu
 
789
   * of the status icon. Whether status icons can have context 
 
790
   * menus and how these are activated is platform-dependent.
 
791
   * 
 
792
   * The @a button and @a activate_time parameters should be 
 
793
   * passed as the last to arguments to Gtk::Menu::popup().
 
794
   * 
 
795
   * Unlike most G_SIGNAL_ACTION signals, this signal is meant to 
 
796
   * be used by applications and should be wrapped by language bindings.
 
797
   * 
 
798
   * @newin{2,10}
 
799
   * @param button The button that was pressed, or 0 if the 
 
800
   * signal is not emitted in response to a button press event.
 
801
   * @param activate_time The timestamp of the event that
 
802
   * triggered the signal emission.
769
803
   */
770
804
 
 
805
 
771
806
  Glib::SignalProxy2< void,guint,guint32 > signal_popup_menu();
772
807
 
773
808
  
774
809
  /**
775
 
   * @par Prototype:
 
810
   * @par Slot Prototype:
776
811
   * <tt>bool on_my_%button_press_event(GdkEventButton* event)</tt>
 
812
   *
 
813
   * The signal_button_press_event() signal will be emitted when a button
 
814
   * (typically from a mouse) is pressed.
 
815
   * 
 
816
   * Whether this event is emitted is platform-dependent.  Use the signal_activate()
 
817
   * and signal_popup_menu() signals in preference.
 
818
   * 
 
819
   * @newin{2,14}
 
820
   * @param event The Gdk::EventButton which triggered 
 
821
   * this signal.
 
822
   * @return <tt>true</tt> to stop other handlers from being invoked
 
823
   * for the event. <tt>false</tt> to propagate the event further.
777
824
   */
778
825
 
 
826
 
779
827
  Glib::SignalProxy1< bool,GdkEventButton* > signal_button_press_event();
780
828
 
781
829
  
782
830
  /**
783
 
   * @par Prototype:
 
831
   * @par Slot Prototype:
784
832
   * <tt>bool on_my_%button_release_event(GdkEventButton* event)</tt>
 
833
   *
 
834
   * The signal_button_release_event() signal will be emitted when a button
 
835
   * (typically from a mouse) is released.
 
836
   * 
 
837
   * Whether this event is emitted is platform-dependent.  Use the signal_activate()
 
838
   * and signal_popup_menu() signals in preference.
 
839
   * 
 
840
   * @newin{2,14}
 
841
   * @param event The Gdk::EventButton which triggered 
 
842
   * this signal.
 
843
   * @return <tt>true</tt> to stop other handlers from being invoked
 
844
   * for the event. <tt>false</tt> to propagate the event further.
785
845
   */
786
846
 
 
847
 
787
848
  Glib::SignalProxy1< bool,GdkEventButton* > signal_button_release_event();
788
849
 
789
850
  
790
851
  /**
791
 
   * @par Prototype:
 
852
   * @par Slot Prototype:
792
853
   * <tt>bool on_my_%scroll_event(GdkEventScroll* event)</tt>
 
854
   *
 
855
   * The signal_scroll_event() signal is emitted when a button in the 4 to 7
 
856
   * range is pressed. Wheel mice are usually configured to generate
 
857
   * button press events for buttons 4 and 5 when the wheel is turned.
 
858
   * 
 
859
   * Whether this event is emitted is platform-dependent.
 
860
   * 
 
861
   * @newin{2,16}
 
862
   * @param event The Gdk::EventScroll which triggered 
 
863
   * this signal.
 
864
   * @return <tt>true</tt> to stop other handlers from being invoked for the event.
 
865
   * <tt>false</tt> to propagate the event further.
793
866
   */
794
867
 
 
868
 
795
869
  Glib::SignalProxy1< bool,GdkEventScroll* > signal_scroll_event();
796
870
 
797
871
  
798
872
  /**
799
 
   * @par Prototype:
 
873
   * @par Slot Prototype:
800
874
   * <tt>bool on_my_%query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip)</tt>
 
875
   *
 
876
   * Emitted when the Gtk::Settings::property_gtk_tooltip_timeout() has expired with the
 
877
   * cursor hovering above @a status_icon; or emitted when @a status_icon got
 
878
   * focus in keyboard mode.
 
879
   * 
 
880
   * Using the given coordinates, the signal handler should determine
 
881
   * whether a tooltip should be shown for @a status_icon. If this is
 
882
   * the case <tt>true</tt> should be returned, <tt>false</tt> otherwise. Note that if
 
883
   *  @a keyboard_mode is <tt>true</tt>, the values of @a x and @a y are undefined and
 
884
   * should not be used.
 
885
   * 
 
886
   * The signal handler is free to manipulate @a tooltip with the therefore
 
887
   * destined function calls.
 
888
   * 
 
889
   * Whether this signal is emitted is platform-dependent.
 
890
   * For plain text tooltips, use Gtk::StatusIcon::property_tooltip_text() in preference.
 
891
   * 
 
892
   * @newin{2,16}
 
893
   * @param x The x coordinate of the cursor position where the request has been
 
894
   * emitted, relative to @a status_icon.
 
895
   * @param y The y coordinate of the cursor position where the request has been
 
896
   * emitted, relative to @a status_icon.
 
897
   * @param keyboard_mode <tt>true</tt> if the tooltip was trigged using the keyboard.
 
898
   * @param tooltip A Gtk::Tooltip.
 
899
   * @return <tt>true</tt> if @a tooltip should be shown right now, <tt>false</tt> otherwise.
801
900
   */
802
901
 
 
902
 
803
903
  Glib::SignalProxy4< bool,int,int,bool,const Glib::RefPtr<Tooltip>& > signal_query_tooltip();
804
904
 
805
905
 
812
912
  //GTK+ Virtual Functions (override these to change behaviour):
813
913
 
814
914
  //Default Signal Handlers::
 
915
  /// This is a default handler for the signal signal_size_changed().
815
916
  virtual bool on_size_changed(int size);
 
917
  /// This is a default handler for the signal signal_activate().
816
918
  virtual void on_activate();
 
919
  /// This is a default handler for the signal signal_popup_menu().
817
920
  virtual void on_popup_menu(guint button, guint32 activate_time);
 
921
  /// This is a default handler for the signal signal_button_press_event().
818
922
  virtual bool on_button_press_event(GdkEventButton* event);
 
923
  /// This is a default handler for the signal signal_button_release_event().
819
924
  virtual bool on_button_release_event(GdkEventButton* event);
 
925
  /// This is a default handler for the signal signal_scroll_event().
820
926
  virtual bool on_scroll_event(GdkEventScroll* event);
 
927
  /// This is a default handler for the signal signal_query_tooltip().
821
928
  virtual bool on_query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip);
822
929
 
823
930