요약.
1. button with stock item
gtk_button_new_from_stock, gtk_button_new_from_stock ()
2. toggle button
- toggle 버튼 생성
gtk_toggle_button_new, gtk_toggle_button_new ()
gtk_toggle_button_new_with_label, gtk_toggle_button_new_with_label() gtk_toggle_button_new_with_mnemonic, gtk_toggle_button_new_with_mnemonic ()
- toggle 버튼 상태 얻기
gtk_toggle_button_get_active, gtk_toggle_button_get_active ()
- toggle 버튼 상태 변경
gtk_widget_set_sensitive, gtk_widget_set_sensitive ()
gtk_toggle_button_set_active, gtk_toggle_button_set_active ()
3. widgets flags
위젯들이 가지고 있는 기본 속성들이 있는데 2번 에서본 gtk_widget_set_sensitiver도 toggle button이 가지고 있는 GTK_SENSITIVE 속성을 변경해 줌으로서 버튼이 눌렸다 떼어지도록 동작하게 하는것입니다. widgets flags는 http://library.gnome.org/devel/gtk/stable/GtkWidget.html 에서 참조하기 바랍니다. 설명 및 widget 속성을 변경하기 위한 api가 나와있습니다.
4. check button
gtk_check_button_new, gtk_check_button_new ()
gtk_check_button_new_with_label, gtk_check_button_new_with_label ()
gtk_check_button_new_with_mnemonic, gtk_check_button_new_with_mnemonic ()
체크버튼은 toggle 시그널을 사용합니다. 그리하여 check 버튼이 check 되어있는지 확인하기 위하여 toggle 버튼에서 사용하는 함수와 동일한 함수를 사용합니다.
5. radio button
gtk_radio_button_new, gtk_radio_button_new ()
gtk_radio_button_new_from_widget, gtk_radio_button_new_from_widget ()
gtk_radio_button_new_with_label, gtk_radio_button_new_with_label ()
gtk_radio_button_new_with_label_from_widget, gtk_radio_button_new_with_label_from_widget ()
gtk_radio_button_new_with_mnemonic, gtk_radio_button_new_with_mnemonic ()
gtk_radio_button_new_with_mnemonic_from_widget, gtk_radio_button_new_with_mnemonic_from_widget ()
6. text entry, spin button, horizontal and vertical scales, font button
생략...ㅡㅡ
7. color button
- 버튼 생성
gtk_color_button_new, gtk_color_button_new ()
gtk_color_button_new_with_color, gtk_color_button_new_with_color ()
- 버튼에서 설정된 칼라 값 가져오기
gtk_color_button_get_color, gtk_color_button_get_color ()
- 위젯의 컬러 속성 바꾸기
gtk_widget_modify_fg, gtk_widget_modify_fg ()
GTK+에서는 컬러값을 GdkColor 구조체로 관리합니다.
구조체는 다음과 같고 많이 쓰이는 헥사값으로 구조체를 채우기 위해서
gboolean gdk_color_parse(const gchar *color_string, GdkColor *color); 와 같은 API를 사용합니다.
struct GdkColor
{
guint32 pixel;
guint16 red;
guint16 green;
guint16 blue;
}
8. file choose button
- 버튼 생성
gtk_file_chooser_button_new, gtk_file_chooser_button_new ()
- 초기 폴더 설정
gtk_file_chooser_set_current_folder, gtk_file_chooser_set_current_folder ()
- 필터 생성
gtk_file_filter_new, gtk_file_filter_new ()
- 필터 이름 설정
gtk_file_filter_set_name, gtk_file_filter_set_name ()
- 필터에 패턴 설정
gtk_file_filter_add_pattern, gtk_file_filter_add_pattern ()
- 필터를 file choose button 에 등록
gtk_file_chooser_add_filter, gtk_file_chooser_add_filter ()
- file choose button에 설정된 파일이름 가져오기
gtk_file_chooser_get_filename, gtk_file_chooser_get_filename ()
GtkFileChooserButton은 GtkFileChooser의 인터페이스만 구현하고 상속받지는 않았음.
9. 연습문제
1. renameing files
- GtkFileChooseButton으로 파일을 선택
- GtkEntry 로 파일이름을 입력받음
- GtkFileChooserButton 으로 선택한 파일이름을 GtkEntry에서 입력받은 파일이름으로 변경
- 작업이 성공적으로 수행되면 GtkFileChooserButton과 GtkEntry 를 비활성화 시킴
2. Spin Button and Scales
- spin button 과 horizontal scale 을 생성후 둘다 같은 초기 값과 경계를 설정한다.
- check button 이 선택되면 spin button 과 horizontal scale은 같은 값으로 설정된다.
- spin button 과 horizontal scale은 정수와 실수 둘다 지원
(나머지 요구사항은 책을 대강 읽어서 인지 영어가 딸려서 인지 잘 이해가 안되네요..ㅡㅡ)
1. button with stock item
gtk_button_new_from_stock, gtk_button_new_from_stock ()
2. toggle button
- toggle 버튼 생성
gtk_toggle_button_new, gtk_toggle_button_new ()
gtk_toggle_button_new_with_label, gtk_toggle_button_new_with_label() gtk_toggle_button_new_with_mnemonic, gtk_toggle_button_new_with_mnemonic ()
- toggle 버튼 상태 얻기
gtk_toggle_button_get_active, gtk_toggle_button_get_active ()
- toggle 버튼 상태 변경
gtk_widget_set_sensitive, gtk_widget_set_sensitive ()
gtk_toggle_button_set_active, gtk_toggle_button_set_active ()
3. widgets flags
위젯들이 가지고 있는 기본 속성들이 있는데 2번 에서본 gtk_widget_set_sensitiver도 toggle button이 가지고 있는 GTK_SENSITIVE 속성을 변경해 줌으로서 버튼이 눌렸다 떼어지도록 동작하게 하는것입니다. widgets flags는 http://library.gnome.org/devel/gtk/stable/GtkWidget.html 에서 참조하기 바랍니다. 설명 및 widget 속성을 변경하기 위한 api가 나와있습니다.
4. check button
gtk_check_button_new, gtk_check_button_new ()
gtk_check_button_new_with_label, gtk_check_button_new_with_label ()
gtk_check_button_new_with_mnemonic, gtk_check_button_new_with_mnemonic ()
체크버튼은 toggle 시그널을 사용합니다. 그리하여 check 버튼이 check 되어있는지 확인하기 위하여 toggle 버튼에서 사용하는 함수와 동일한 함수를 사용합니다.
5. radio button
gtk_radio_button_new, gtk_radio_button_new ()
gtk_radio_button_new_from_widget, gtk_radio_button_new_from_widget ()
gtk_radio_button_new_with_label, gtk_radio_button_new_with_label ()
gtk_radio_button_new_with_label_from_widget, gtk_radio_button_new_with_label_from_widget ()
gtk_radio_button_new_with_mnemonic, gtk_radio_button_new_with_mnemonic ()
gtk_radio_button_new_with_mnemonic_from_widget, gtk_radio_button_new_with_mnemonic_from_widget ()
6. text entry, spin button, horizontal and vertical scales, font button
생략...ㅡㅡ
7. color button
- 버튼 생성
gtk_color_button_new, gtk_color_button_new ()
gtk_color_button_new_with_color, gtk_color_button_new_with_color ()
- 버튼에서 설정된 칼라 값 가져오기
gtk_color_button_get_color, gtk_color_button_get_color ()
- 위젯의 컬러 속성 바꾸기
gtk_widget_modify_fg, gtk_widget_modify_fg ()
GTK+에서는 컬러값을 GdkColor 구조체로 관리합니다.
구조체는 다음과 같고 많이 쓰이는 헥사값으로 구조체를 채우기 위해서
gboolean gdk_color_parse(const gchar *color_string, GdkColor *color); 와 같은 API를 사용합니다.
struct GdkColor
{
guint32 pixel;
guint16 red;
guint16 green;
guint16 blue;
}
8. file choose button
- 버튼 생성
gtk_file_chooser_button_new, gtk_file_chooser_button_new ()
- 초기 폴더 설정
gtk_file_chooser_set_current_folder, gtk_file_chooser_set_current_folder ()
- 필터 생성
gtk_file_filter_new, gtk_file_filter_new ()
- 필터 이름 설정
gtk_file_filter_set_name, gtk_file_filter_set_name ()
- 필터에 패턴 설정
gtk_file_filter_add_pattern, gtk_file_filter_add_pattern ()
- 필터를 file choose button 에 등록
gtk_file_chooser_add_filter, gtk_file_chooser_add_filter ()
- file choose button에 설정된 파일이름 가져오기
gtk_file_chooser_get_filename, gtk_file_chooser_get_filename ()
GtkFileChooserButton은 GtkFileChooser의 인터페이스만 구현하고 상속받지는 않았음.
9. 연습문제
1. renameing files
- GtkFileChooseButton으로 파일을 선택
- GtkEntry 로 파일이름을 입력받음
- GtkFileChooserButton 으로 선택한 파일이름을 GtkEntry에서 입력받은 파일이름으로 변경
- 작업이 성공적으로 수행되면 GtkFileChooserButton과 GtkEntry 를 비활성화 시킴
2. Spin Button and Scales
- spin button 과 horizontal scale 을 생성후 둘다 같은 초기 값과 경계를 설정한다.
- check button 이 선택되면 spin button 과 horizontal scale은 같은 값으로 설정된다.
- spin button 과 horizontal scale은 정수와 실수 둘다 지원
(나머지 요구사항은 책을 대강 읽어서 인지 영어가 딸려서 인지 잘 이해가 안되네요..ㅡㅡ)
댓글을 달아 주세요