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

« back to all changes in this revision

Viewing changes to gtk/gtkmm/button.cc

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 09:25:06 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20120928092506-9h63ais5o750a8sk
Tags: 3.5.13-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libglibmm-2.4-dev, libgtk-3-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <gtkmm/private/button_p.h>
8
8
 
9
9
 
10
 
// -*- c++ -*-
11
 
/* $Id: button.ccg,v 1.1 2003/01/21 13:38:43 murrayc Exp $ */
12
 
 
13
 
/* 
14
 
 *
 
10
/*
15
11
 * Copyright 1998-2002 The gtkmm Development Team
16
12
 *
17
13
 * This library is free software; you can redistribute it and/or
519
515
 
520
516
void Button::clicked()
521
517
{
522
 
  gtk_button_clicked(gobj()); 
 
518
  gtk_button_clicked(gobj());
523
519
}
524
520
 
525
521
void Button::set_relief(ReliefStyle newstyle)
526
522
{
527
 
  gtk_button_set_relief(gobj(), ((GtkReliefStyle)(newstyle))); 
 
523
  gtk_button_set_relief(gobj(), ((GtkReliefStyle)(newstyle)));
528
524
}
529
525
 
530
526
ReliefStyle Button::get_relief() const
534
530
 
535
531
void Button::set_label(const Glib::ustring& label)
536
532
{
537
 
  gtk_button_set_label(gobj(), label.c_str()); 
 
533
  gtk_button_set_label(gobj(), label.c_str());
538
534
}
539
535
 
540
536
Glib::ustring Button::get_label() const
544
540
 
545
541
void Button::set_use_underline(bool use_underline)
546
542
{
547
 
  gtk_button_set_use_underline(gobj(), static_cast<int>(use_underline)); 
 
543
  gtk_button_set_use_underline(gobj(), static_cast<int>(use_underline));
548
544
}
549
545
 
550
546
bool Button::get_use_underline() const
554
550
 
555
551
void Button::set_use_stock(bool use_stock)
556
552
{
557
 
  gtk_button_set_use_stock(gobj(), static_cast<int>(use_stock)); 
 
553
  gtk_button_set_use_stock(gobj(), static_cast<int>(use_stock));
558
554
}
559
555
 
560
556
bool Button::get_use_stock() const
564
560
 
565
561
void Button::set_focus_on_click(bool focus_on_click)
566
562
{
567
 
  gtk_button_set_focus_on_click(gobj(), static_cast<int>(focus_on_click)); 
 
563
  gtk_button_set_focus_on_click(gobj(), static_cast<int>(focus_on_click));
568
564
}
569
565
 
570
566
bool Button::get_focus_on_click() const
574
570
 
575
571
void Button::set_alignment(float xalign, float yalign)
576
572
{
577
 
  gtk_button_set_alignment(gobj(), xalign, yalign); 
 
573
  gtk_button_set_alignment(gobj(), xalign, yalign);
578
574
}
579
575
 
580
576
void Button::get_alignment(float& xalign, float& yalign)
581
577
{
582
 
  gtk_button_get_alignment(gobj(), &(xalign), &(yalign)); 
 
578
  gtk_button_get_alignment(gobj(), &(xalign), &(yalign));
583
579
}
584
580
 
585
581
void Button::set_image(Widget& image)
586
582
{
587
 
  gtk_button_set_image(gobj(), (image).gobj()); 
 
583
  gtk_button_set_image(gobj(), (image).gobj());
588
584
}
589
585
 
590
586
Widget* Button::get_image()
599
595
 
600
596
void Button::set_image_position(PositionType position)
601
597
{
602
 
  gtk_button_set_image_position(gobj(), ((GtkPositionType)(position))); 
 
598
  gtk_button_set_image_position(gobj(), ((GtkPositionType)(position)));
603
599
}
604
600
 
605
601
PositionType Button::get_image_position() const
609
605
 
610
606
void Button::set_always_show_image(bool always_show)
611
607
{
612
 
  gtk_button_set_always_show_image(gobj(), static_cast<int>(always_show)); 
 
608
  gtk_button_set_always_show_image(gobj(), static_cast<int>(always_show));
613
609
}
614
610
 
615
611
bool Button::get_always_show_image()
619
615
 
620
616
Glib::RefPtr<Gdk::Window> Button::get_event_window()
621
617
{
622
 
 
623
618
  Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap(gtk_button_get_event_window(gobj()));
624
619
  if(retvalue)
625
620
    retvalue->reference(); //The function does not do a ref for us.
626
621
  return retvalue;
627
 
 
628
622
}
629
623
 
630
624
Glib::RefPtr<const Gdk::Window> Button::get_event_window() const