The manual of the GTK+ 2.0 application - Desktop App Chooser which let the user to browse all installed X desktop applications and retrieve the Desktop Entry content of each application.
This document provides an overview and introduction to developing graphical user interfaces (GUIs) for GTK+ applications using Glade 3. It discusses key GTK+ concepts like widgets, signals, and the object hierarchy. It then introduces Glade 3 and how to get started designing a GUI interface using the Glade interface. Specific steps covered include adding a top-level window widget, manipulating widget properties, specifying callback functions for signals, adding additional widgets, and editing menus/toolbars. The document is intended to guide the reader through designing the GUI for a sample text editor application in Glade before implementing it in code.
GTK+ is a highly usable and feature-rich toolkit for building graphical user interfaces that is written in C but has bindings to many other languages. It provides stability, cross-platform compatibility, and an accommodating interface. GTK+ is part of the GNU project and relies on supporting libraries like GLib, GObject, GDK, Pango, and ATK. Applications using GTK+ follow a standard structure, initializing the environment, running the main event loop, using data types like widgets, and defining callback functions to handle events.
The document discusses how to create Android home screen widgets. It explains that widgets require an AppWidgetProviderInfo XML, AppWidgetProvider class, and view layout XML. The AppWidgetProvider class handles widget updates and broadcasts. RemoteViews allow updating widget views without an activity. PendingIntents make widgets interactive by starting activities on click. The document also provides examples for updating widgets, handling long operations, and adding touch feedback.
This document provides an overview of Android including:
- Android is an open source software platform and operating system for mobile devices based on the Linux kernel.
- It allows developers to write managed code using the Java programming language and includes features like views, content providers, notifications and more.
- The Android SDK provides tools for building, testing and debugging Android apps and uses a specific project structure.
- Input controls like buttons, text fields, checkboxes and spinners allow users to interact with apps. Attributes define behaviors of these controls.
- Screen size, density, resolution and orientation impact user interfaces and alternative resources support different densities.
This document describes the steps to create a Crystal Reports application using PWCT 1.9 Art Documentation software. It involves:
1. Creating a new window with title "Crystal Reports 10 Sample"
2. Adding controls like a button and activeX object to view reports
3. Defining procedures to open a sample report using Crystal Reports OLE automation and assign it to the activeX object for viewing.
This document summarizes the topics of menus and dialogs covered in Android application development session 3. It discusses the three types of menus: option menus, context menus, and popup menus. It provides code examples for creating and handling each type of menu. It also discusses the three types of dialogs: alert dialogs, progress dialogs, and custom dialogs. Code is shown for building each type of dialog and handling button clicks. Custom dialog creation involves separate layout files for the main screen and dialog, with code to display the custom dialog when a button is clicked.
This document provides an overview of an Android application development session that covers topics from the basics of Android to an advanced level. It discusses introducing Android and the Android SDK. It describes how to set up the development environment on Windows and Linux and install the Android Development Tools plugin for Eclipse. It demonstrates how to create an Android project in Eclipse and build a simple "Hello World" application. It also explains the structure of an Android project directory and the purpose of key directories like res, src, and values.
This document provides an overview of an Android application development session that covers the Android framework, Android layouts, and basic UI widgets. The session will discuss the main components of the Android framework - activities, services, broadcast receivers, and content providers. It will explain how to design screens using linear, relative and list views in Android layouts. It will also demonstrate how to add basic widgets like text boxes, buttons, checkboxes and radio buttons to a user interface. Code examples are provided to illustrate how to set up activities, initialize views, and retrieve widget values.
The document provides tutorials for various user interface widgets in Android application development. It includes tutorials for date pickers, time pickers, spinners, buttons, text fields, checkboxes, radio buttons, toggle buttons, and rating bars. Each tutorial section describes how to add the widget to an app layout, populate it with data where applicable, and add click listeners or other logic to handle user interactions with the widget. The tutorials are intended to demonstrate how to correctly implement and use common UI elements in Android apps.
The document discusses e-business systems development and widgets. It defines widgets as graphical user interface components that allow users to interact with applications and operating systems. Widgets can refer to both the graphical element and its controlling program. The history section notes that early widgets were designed for home computers in 1981 and Netscape helped popularize them with widgets for stock quotes and weather in 1996. Typical widgets mentioned include buttons, dialog boxes, menus, icons, and windows. The document states that millions of widgets have been created by developers from various backgrounds for personal and business use.
This document provides an overview of GUI programming. It discusses GUI structure using containers and components. It explains how to add behavior to GUIs through event-driven programming and the observer pattern. It also covers GUI appearance topics like layouts and look and feel. The document recommends using multi-threading to prevent GUIs from freezing during intensive tasks. It concludes with some GUI design guidelines such as keeping interfaces clear and feedback concise.
This document provides an overview of developing Android applications. It discusses installing the necessary tools like the Android SDK and Eclipse plugin. It describes creating an Android project in Eclipse, including specifying the SDK location. It explains app components like activities and services. It provides an example of adding maps functionality by configuring the manifest file and getting an API key. The document is a tutorial that introduces major Android development concepts in a brief and high-level manner.
The document discusses GUI event handling in Java. It explains that window-based Java programs are event-driven, meaning they wait for and respond to user-initiated events like button clicks or key presses. When an event occurs, an event object is passed to a listener object that handles the event. Listeners implement interfaces that correspond to different event types, like ActionListener for button clicks. The delegation event model in Java handles event passing from components to listeners.
The document discusses different ways to create graphical user interfaces (GUIs) in MATLAB. It describes GUIDE, the MATLAB GUI development environment, which provides tools to simplify laying out and programming GUIs. It also discusses programmatically creating GUIs by writing code files that generate GUI functions or scripts. An example is provided of programmatically generating a simple GUI with push buttons, a pop-up menu, static text, and an axes component to display plots.
The Glass Class - Tutorial 3 - Android and GDKGun Lee
Tutorial 3: Android and GDK (Glass Development Kit)
The Glass Class at HIT Lab NZ
Learn how to program and develop for Google Glass.
https://www.youtube.com/watch?v=BRpedu1PRf8&list=PLsIGb72j1WOlLFoJqkhyugDv-juTEAtas
http://arforglass.org
http://www.hitlabnz.org
This document provides an overview of the tools and steps needed to develop Android applications in Eclipse. It describes how to install the Android SDK and set up an Android project in Eclipse. It also explains key Android concepts like activities, services, and the manifest file. The document demonstrates how to add a MapView to an app and get an API key for Google Maps. It provides guidance on running apps in the emulator or on a device, as well as debugging techniques.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to layouts.
This document provides an overview of the steps to create an Android application using Eclipse that incorporates Google Maps. It describes downloading the necessary tools like the Android SDK and Eclipse plugin. It explains how to set up a project, configure the manifest file to include the maps library and internet permission. It also covers getting an API key for maps by obtaining the fingerprint of the debug certificate. The document then gives examples of basic maps functionality like adding a MapView to a layout.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to an app's layout.
This document provides an overview of event-driven programming and Visual Basic fundamentals. It discusses what an event-driven program is and how it differs from procedural programming by responding to events like button clicks rather than executing code sequentially. It also covers building a first Visual Basic application, including planning the user interface and code, and using intrinsic controls. Additional sections explain properties, methods, and events of objects, and working with Visual Basic projects by opening, saving, and running them.
This set of slides introduces the reader to the concepts of Android Activities and Views. After presenting these two concepts in general terms, it continues with a detailed description of the activity lifecycle. It follows a discussion on how to structure the user interface in terms of View and ViewGroup objects. Finally, the presentation shows how to frame Android application development within the dictates of the Model-View-Controller (MVC) pattern.
Here are the answers to your checkpoint questions:
1. An event loop constantly checks for any interactions from the user, like button clicks, text input, etc. It listens for these "events" and allows the program to respond to user actions.
2. The 3 minimum lines of code to create a GUI App are:
- Import App class from guizero
- Create App object
- Call display() on the App object
3. Widgets are the individual components or elements that make up a GUI, like labels, buttons, text boxes, etc. They are used to display information and get input from the user.
The document provides an introduction to graphical user interfaces (GUIs) in MATLAB. It discusses what a GUI is, how GUIs are constructed in MATLAB using .m and .fig files, and provides an example of a simple GUI with various components like text boxes, buttons, and menus. It also describes handle graphics and how GUI components can be programmed and manipulated using functions like set, get, and callbacks to control the behavior and appearance of the GUI.
Visual Basic is an event-driven programming language that allows developers to build graphical user interface (GUI) applications. It uses forms to create windows for the user interface. Controls like text boxes, labels, and buttons are placed on the forms to allow user interaction. When an event like a button click occurs, the corresponding event procedure code is executed. The user interface is designed using forms, and properties are assigned to controls to determine characteristics like names, sizes, and positions. Code is attached to controls using event procedures to determine what happens when events occur.
A Novel approach for Graphical User Interface development and real time Objec...IOSR Journals
This document presents a novel approach for developing graphical user interfaces and real-time object and face tracking using image processing and computer vision techniques implemented in MATLAB. Key aspects include developing a GUI for image manipulation, object detection and tracking in real-time using color segmentation, expanding this to control a robot, and implementing face detection and tracking using the Viola-Jones algorithm and CAMShift for multiple faces. The approach aims to provide a unified GUI for advanced image processing functions.
The document discusses e-business systems development and widgets. It defines widgets as graphical user interface components that allow users to interact with applications and operating systems. Widgets can refer to both the graphical element and its controlling program. The history section notes that early widgets were designed for home computers in 1981 and Netscape helped popularize them with web browsers in 1996. Typical widgets mentioned include buttons, windows, menus, and indicators. The document states that millions of widgets have been created by developers from various backgrounds for personal and business use.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It describes how an Android application is structured with packages like src, res, assets etc. It explains what an activity is, how it provides the user interface, and how it loads views from XML layouts. It also provides an example of creating a simple project with an activity that displays the current time when a button is pressed to demonstrate the basic concepts.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It covers the anatomy of an Android application including activities, services, content providers, and broadcast receivers. It also discusses the lifecycle of activities and how to create activities that load layouts and handle user interactions through callbacks like onCreate(). An example is provided of building an app with an activity to display the current time when a button is pressed to demonstrate designing user interfaces and adding interactivity.
This document provides an overview of an Android application development session that covers the Android framework, Android layouts, and basic UI widgets. The session will discuss the main components of the Android framework - activities, services, broadcast receivers, and content providers. It will explain how to design screens using linear, relative and list views in Android layouts. It will also demonstrate how to add basic widgets like text boxes, buttons, checkboxes and radio buttons to a user interface. Code examples are provided to illustrate how to set up activities, initialize views, and retrieve widget values.
The document provides tutorials for various user interface widgets in Android application development. It includes tutorials for date pickers, time pickers, spinners, buttons, text fields, checkboxes, radio buttons, toggle buttons, and rating bars. Each tutorial section describes how to add the widget to an app layout, populate it with data where applicable, and add click listeners or other logic to handle user interactions with the widget. The tutorials are intended to demonstrate how to correctly implement and use common UI elements in Android apps.
The document discusses e-business systems development and widgets. It defines widgets as graphical user interface components that allow users to interact with applications and operating systems. Widgets can refer to both the graphical element and its controlling program. The history section notes that early widgets were designed for home computers in 1981 and Netscape helped popularize them with widgets for stock quotes and weather in 1996. Typical widgets mentioned include buttons, dialog boxes, menus, icons, and windows. The document states that millions of widgets have been created by developers from various backgrounds for personal and business use.
This document provides an overview of GUI programming. It discusses GUI structure using containers and components. It explains how to add behavior to GUIs through event-driven programming and the observer pattern. It also covers GUI appearance topics like layouts and look and feel. The document recommends using multi-threading to prevent GUIs from freezing during intensive tasks. It concludes with some GUI design guidelines such as keeping interfaces clear and feedback concise.
This document provides an overview of developing Android applications. It discusses installing the necessary tools like the Android SDK and Eclipse plugin. It describes creating an Android project in Eclipse, including specifying the SDK location. It explains app components like activities and services. It provides an example of adding maps functionality by configuring the manifest file and getting an API key. The document is a tutorial that introduces major Android development concepts in a brief and high-level manner.
The document discusses GUI event handling in Java. It explains that window-based Java programs are event-driven, meaning they wait for and respond to user-initiated events like button clicks or key presses. When an event occurs, an event object is passed to a listener object that handles the event. Listeners implement interfaces that correspond to different event types, like ActionListener for button clicks. The delegation event model in Java handles event passing from components to listeners.
The document discusses different ways to create graphical user interfaces (GUIs) in MATLAB. It describes GUIDE, the MATLAB GUI development environment, which provides tools to simplify laying out and programming GUIs. It also discusses programmatically creating GUIs by writing code files that generate GUI functions or scripts. An example is provided of programmatically generating a simple GUI with push buttons, a pop-up menu, static text, and an axes component to display plots.
The Glass Class - Tutorial 3 - Android and GDKGun Lee
Tutorial 3: Android and GDK (Glass Development Kit)
The Glass Class at HIT Lab NZ
Learn how to program and develop for Google Glass.
https://www.youtube.com/watch?v=BRpedu1PRf8&list=PLsIGb72j1WOlLFoJqkhyugDv-juTEAtas
http://arforglass.org
http://www.hitlabnz.org
This document provides an overview of the tools and steps needed to develop Android applications in Eclipse. It describes how to install the Android SDK and set up an Android project in Eclipse. It also explains key Android concepts like activities, services, and the manifest file. The document demonstrates how to add a MapView to an app and get an API key for Google Maps. It provides guidance on running apps in the emulator or on a device, as well as debugging techniques.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to layouts.
This document provides an overview of the steps to create an Android application using Eclipse that incorporates Google Maps. It describes downloading the necessary tools like the Android SDK and Eclipse plugin. It explains how to set up a project, configure the manifest file to include the maps library and internet permission. It also covers getting an API key for maps by obtaining the fingerprint of the debug certificate. The document then gives examples of basic maps functionality like adding a MapView to a layout.
This document provides an overview of key concepts for developing Android applications. It discusses installing the necessary tools like Eclipse, the Android SDK, and configuring the ADT plugin. It also covers creating Android projects, using layouts and resources, adding activities and services to the manifest, and debugging apps. The document demonstrates how to display maps using the Google Maps API, including getting an API key and adding the MapView to an app's layout.
This document provides an overview of event-driven programming and Visual Basic fundamentals. It discusses what an event-driven program is and how it differs from procedural programming by responding to events like button clicks rather than executing code sequentially. It also covers building a first Visual Basic application, including planning the user interface and code, and using intrinsic controls. Additional sections explain properties, methods, and events of objects, and working with Visual Basic projects by opening, saving, and running them.
This set of slides introduces the reader to the concepts of Android Activities and Views. After presenting these two concepts in general terms, it continues with a detailed description of the activity lifecycle. It follows a discussion on how to structure the user interface in terms of View and ViewGroup objects. Finally, the presentation shows how to frame Android application development within the dictates of the Model-View-Controller (MVC) pattern.
Here are the answers to your checkpoint questions:
1. An event loop constantly checks for any interactions from the user, like button clicks, text input, etc. It listens for these "events" and allows the program to respond to user actions.
2. The 3 minimum lines of code to create a GUI App are:
- Import App class from guizero
- Create App object
- Call display() on the App object
3. Widgets are the individual components or elements that make up a GUI, like labels, buttons, text boxes, etc. They are used to display information and get input from the user.
The document provides an introduction to graphical user interfaces (GUIs) in MATLAB. It discusses what a GUI is, how GUIs are constructed in MATLAB using .m and .fig files, and provides an example of a simple GUI with various components like text boxes, buttons, and menus. It also describes handle graphics and how GUI components can be programmed and manipulated using functions like set, get, and callbacks to control the behavior and appearance of the GUI.
Visual Basic is an event-driven programming language that allows developers to build graphical user interface (GUI) applications. It uses forms to create windows for the user interface. Controls like text boxes, labels, and buttons are placed on the forms to allow user interaction. When an event like a button click occurs, the corresponding event procedure code is executed. The user interface is designed using forms, and properties are assigned to controls to determine characteristics like names, sizes, and positions. Code is attached to controls using event procedures to determine what happens when events occur.
A Novel approach for Graphical User Interface development and real time Objec...IOSR Journals
This document presents a novel approach for developing graphical user interfaces and real-time object and face tracking using image processing and computer vision techniques implemented in MATLAB. Key aspects include developing a GUI for image manipulation, object detection and tracking in real-time using color segmentation, expanding this to control a robot, and implementing face detection and tracking using the Viola-Jones algorithm and CAMShift for multiple faces. The approach aims to provide a unified GUI for advanced image processing functions.
The document discusses e-business systems development and widgets. It defines widgets as graphical user interface components that allow users to interact with applications and operating systems. Widgets can refer to both the graphical element and its controlling program. The history section notes that early widgets were designed for home computers in 1981 and Netscape helped popularize them with web browsers in 1996. Typical widgets mentioned include buttons, windows, menus, and indicators. The document states that millions of widgets have been created by developers from various backgrounds for personal and business use.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It describes how an Android application is structured with packages like src, res, assets etc. It explains what an activity is, how it provides the user interface, and how it loads views from XML layouts. It also provides an example of creating a simple project with an activity that displays the current time when a button is pressed to demonstrate the basic concepts.
Day 3: Getting Active Through ActivitiesAhsanul Karim
The document discusses Android application development and activities. It covers the anatomy of an Android application including activities, services, content providers, and broadcast receivers. It also discusses the lifecycle of activities and how to create activities that load layouts and handle user interactions through callbacks like onCreate(). An example is provided of building an app with an activity to display the current time when a button is pressed to demonstrate designing user interfaces and adding interactivity.
This document provides an overview of Visual Basic.Net (VB.Net) and the .NET framework. It discusses the key aspects of VB.Net including adding controls to forms, familiarizing with control properties, creating and saving projects. It also summarizes the .NET framework which includes the Common Language Runtime and Framework Class Library that allow applications to be developed across programming languages. Applications built on .NET do not directly access hardware and instead use services from the .NET Framework.
The app we'll build in this tutorial is going to let users get connected to their Google account, download their calendars, and create a new event with a description and a date/time. The new event will be posted to a calendar that the user selects.
A complete Lab Manual with Aim, Procedure, Source Code, ... All the Experiments of Mobile Application Development Lab are developed using Android Studio.
This document provides an overview of tools and steps for developing Android applications. It describes installing the Android SDK and Eclipse plugin, creating an Android project, basic project components like activities and services, using the Android emulator and debugger, and includes an example of integrating the Google Maps API. The tutorial is intended as a brief introduction to major Android development concepts and references more complete documentation on the Android developer site.
This document summarizes a mobile computing lab session on creating user interfaces in Android. The key topics covered include:
1. Introduction of common Android views like TextView, EditText, Button and ImageView. Views are basic UI elements and ViewGroups arrange views in layouts.
2. Demonstration of common Android layouts - LinearLayout arranges views vertically or horizontally, RelativeLayout positions views relative to each other, TableLayout arranges views in a table, and FrameLayout overlays views.
3. Explanation of five different methods to handle button click events in Android - using XML onClick attribute, implementing OnClickListener interface, inner classes, interface variables, and anonymous inner classes.
This document is a project report submitted for a Master's degree in Computer Science. It includes sections on an introduction to visual programming using Visual Basic, system configuration, project selection, existing and proposed systems, system analysis, design including input and output design, coding, testing, implementation, and maintenance. The project involves developing a software system using Visual Basic to improve upon an existing manual system.
Hidden Object Detection for Computer Vision Based Test Automation SystemSyeful Islam
This document proposes methods to help computer vision-based automation tools more easily detect and interact with hidden objects in graphical user interfaces (GUIs) during software testing. Current vision-based automation systems rely only on image recognition and mouse events, which makes it difficult to find and access hidden GUI elements like dropdown lists or slider positions. The proposed methods add the use of keyboard shortcuts along with image clicks to interact with visible objects and reveal hidden objects, allowing automation tools to more quickly and accurately access hidden objects as part of testing test cases. This should enhance the capabilities of vision-based automation systems.
This document outlines the steps to create a simple GUI application in PWCT 1.9 Art Documentation. It describes creating a main window, adding controls like labels and buttons, and linking a button event to call a procedure. The steps include selecting components from the component browser to build out a steps tree in the Goal Designer. The final steps tree shows the defined window, labels, button, and close procedure that gets called on the button click event.
Android User Interface: Basic Form WidgetsAhsanul Karim
This document provides a tutorial on creating various user interface elements in Android applications, including buttons, text fields, checkboxes, radio buttons, toggle buttons, rating bars, and auto-complete text views. It includes code examples for adding each element to an app layout and handling user interactions with them.
Presentation from #andevcon by Anna Schaller
Peter van der Linden, Android Technology Evangelists from the Developer Platforms and Services team at Motorola Mobility. More info at http://developer.motorola.com
GUI-based testing involves exercising a program's graphical user interface to detect errors. There are several approaches to GUI-based testing, including model-based testing using event-flow or state models, capture and replay of user sessions, and manual testing. Choosing a testing approach depends on factors like the GUI technology. Tools like Marathon and Abbot can automate capturing, replaying, and checking GUI test cases to make the process more efficient.
This document provides an overview of WinForms GUI programming in .NET. It discusses how event-driven programming works in WinForms applications and how Visual Studio supports drag-and-drop design of WinForms. It also describes some key concepts like forms, controls, properties and events. The document explains how to set up a basic WinForms application and interact with common controls like labels, text boxes and buttons.
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
Thrift is used to define interfaces and generate code to build RPC clients and servers. The document discusses installing tools and libraries needed for Thrift including GCC, Boost, Java, Ant, Autoconf and others. It then covers generating code for C++, Java and PHP from a Thrift IDL file and running a sample Thrift server and clients in C++ and Java.
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
This document provides instructions for setting up ODBC database access on Linux using Qt. It describes installing the unixODBC library, Microsoft SQL Server ODBC driver, and Qt ODBC SQL driver plugin. It also explains how to create a DSN, use the sqlcmd tool to connect to SQL Server, and write Qt applications that use the ODBC driver plugin to connect via ODBC.
SWIG is a tool that connects C/C++ code to scripting languages like PHP. It works by taking C/C++ declarations and generating wrapper code. To use SWIG with PHP: 1) Write a SWIG interface file; 2) Run SWIG to generate wrapper code; 3) Compile the wrapper code into a PHP extension. The extension can then be loaded in PHP to access functions defined in the C/C++ code.
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 William Lee
This document provides instructions to upgrade GCC to version 4.9.0 and install Qt 5.4.1 on CentOS 6.5. It describes downloading and compiling GCC from source, setting it as the default compiler, and copying libraries. It also covers downloading and running the Qt 5.4.1 installer, adding Qt commands to the PATH, and copying pkg-config files. The goal is to support C++11 and have a newer compiler and Qt version on the older CentOS 6.5 operating system.
This document provides instructions and information for using the Bro network security monitor and its associated tools. It discusses installing Bro from source and describes Bro's architecture and event-based model. It also explains how to use Bro tools like BroControl and inspect Bro logs. The document outlines how to write Bro scripts and filter network traffic. It demonstrates reading pcap files with Bro and communicating with Bro using the Broccoli library.
Usage Note of Microsoft Dependency WalkerWilliam Lee
Dependency Walker is a free utility that scans 32-bit and 64-bit Windows modules to build a hierarchical tree showing module dependencies. It detects common application problems such as missing or invalid modules. It can be run as a graphical or console application, and handles various types of module dependencies. Dependency Walker runs on many versions of Windows, and can process modules for Windows CE. It is similar to the "ldd" and "nm" tools for Unix systems, and shows which functions a module exports and calls.
PlayCap is a packet replay tool that allows users to replay packet capture (PCAP) files by reading the files and sending the captured packets to a selected network interface. It has a graphical user interface and was created by Signal11. To use PlayCap, download the source code, build it using CMake, open a PCAP file, select a network interface, and click "Playback" to replay the packets. Other packet replay tools include those integrated with Wireshark, while sites like the Bro IDS wiki collect packet traces for analysis or replay.
This document describes how to implement kinetic scrolling in a Qt application. It discusses using mouse events to enable dragging and scrolling of a list. It also explains how to simulate inertia or kinetic scrolling by recording drag velocity and applying deceleration to continue scrolling the list even after dragging stops. Code examples and links are provided to help understand the implementation and see it in action. The document also covers setting up the Qt development environment and using tools like Qt Creator and Doxygen to build, run and document Qt applications.
This document provides an overview of common gateway interface (CGI) and active server pages (ASP) for generating dynamic web pages. It explains that CGI involves running a separate process for each request, which can reduce performance. ASP was developed to address this by allowing tags to be inserted into web pages that are replaced with dynamic data when the page loads, without needing a separate process. The document also describes how form data is received in CGI and the basic workflow of CGI and ASP programs.
Moblin2 - Window Manager(Mutter) PluginWilliam Lee
The document summarizes key aspects of the Moblin2 window manager Mutter including:
- Mutter is based on Metacity and uses Clutter for rendering. It loads plugins from /usr/lib/metacity/plugins/clutter/ such as default.so and moblin-netbook.so.
- Plugins are loaded in mutter_display_open() and implement common interfaces like minimize() and map().
- The Clutter stage is initialized in clutter_cmp_manage_screen() and displayed in an overlay window layer.
- Custom content can be added in a plugin's constructed() function. Debug messages can be added using g_debug().
MGCP is a protocol used to control media gateways that convert between audio signals and data packets. It uses a master-slave architecture with a media gateway controlled by a call agent. MGCP commands include CRCX to create connections, MDCX to modify them, and DLCX to delete them. Basic call flows include the media gateway registering with the call agent, creating a call by requesting digits and notifying of events, and terminating a call by deleting connections on hook events.
This document discusses configuring Asterisk IP-PBX call detail record (CDR) log rotation using Linux cron jobs and the logrotate tool. It explains that Asterisk stores CDRs in CSV format files by default, and that logrotate can be used to automatically rotate and compress and delete old CDR log files on a daily basis. Instructions are provided on setting up a logrotate configuration file and cron job to implement automatic CDR log rotation.
L.A.M.P Installation Note --- CentOS 6.5William Lee
- The document provides installation and configuration instructions for LAMP (Linux, Apache, MySQL, PHP) on a CentOS 6.5 server.
- It details how to install and configure the core LAMP components like Apache 2.2, MySQL 5, and PHP 5 as well as additional components like phpMyAdmin.
- Troubleshooting tips are provided for common Apache and PHP issues along with explanations and solutions.
- Configuration files and their settings are described for optimal performance of the LAMP stack.
This document summarizes the Butterfat Internationalization (b28n) project, which implements internationalization in a JavaScript library (b28n.js) that reads XML files to translate text. It describes how to use the b28n library by creating language-specific XML files, including b28n.js, setting the text domain, and translating elements by id. It also explains how to set the user's language preference in a cookie and reload the page.
This document provides notes and code samples for using SQLite3 in C applications. It includes information on resolving link errors when building SQLite3 applications, the two forms of the LIMIT clause, using the sqlite3_get_table() function to retrieve and iterate through query results, and using the Firefox SQLite Manager add-on to view and edit SQLite databases. Code samples demonstrate getting the total record count of a table, iterating through retrieved records in different ways, and connecting and querying a SQLite database.
This document discusses Android storage and Opaque Binary Blobs (OBBs). It defines StorageManager as the interface for storage-related items like OBBs. OBBs allow large binary assets to be stored outside an APK and mounted on demand. The document outlines how to create an encrypted OBB file using mkobb.sh, change its owner, sign it with obbtool, and include it in an OBB-enabled APK to securely provide additional app resources like large files.
This document provides instructions for building Chromium OS from source code. It includes sections on setting up the build environment, retrieving the Chromium OS source code, building packages and images, debugging, and common commands. The build process involves initializing a chroot environment, configuring packages and boards, and compiling the necessary components to create Chromium OS disk images that can be used to install the operating system.
Spark is a powerhouse for large datasets, but when it comes to smaller data workloads, its overhead can sometimes slow things down. What if you could achieve high performance and efficiency without the need for Spark?
At S&P Global Commodity Insights, having a complete view of global energy and commodities markets enables customers to make data-driven decisions with confidence and create long-term, sustainable value. 🌍
Explore delta-rs + CDC and how these open-source innovations power lightweight, high-performance data applications beyond Spark! 🚀
Mobile App Development Company in Saudi ArabiaSteve Jonas
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveScyllaDB
Want to learn practical tips for designing systems that can scale efficiently without compromising speed?
Join us for a workshop where we’ll address these challenges head-on and explore how to architect low-latency systems using Rust. During this free interactive workshop oriented for developers, engineers, and architects, we’ll cover how Rust’s unique language features and the Tokio async runtime enable high-performance application development.
As you explore key principles of designing low-latency systems with Rust, you will learn how to:
- Create and compile a real-world app with Rust
- Connect the application to ScyllaDB (NoSQL data store)
- Negotiate tradeoffs related to data modeling and querying
- Manage and monitor the database for consistently low latencies
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxAnoop Ashok
In today's fast-paced retail environment, efficiency is key. Every minute counts, and every penny matters. One tool that can significantly boost your store's efficiency is a well-executed planogram. These visual merchandising blueprints not only enhance store layouts but also save time and money in the process.
Quantum Computing Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxJustin Reock
Building 10x Organizations with Modern Productivity Metrics
10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, ‘The Coding War Games.’
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method we invent for the delivery of products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches actually work? DORA? SPACE? DevEx? What should we invest in and create urgency behind today, so that we don’t find ourselves having the same discussion again in a decade?
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
Dev Dives: Automate and orchestrate your processes with UiPath MaestroUiPathCommunity
This session is designed to equip developers with the skills needed to build mission-critical, end-to-end processes that seamlessly orchestrate agents, people, and robots.
📕 Here's what you can expect:
- Modeling: Build end-to-end processes using BPMN.
- Implementing: Integrate agentic tasks, RPA, APIs, and advanced decisioning into processes.
- Operating: Control process instances with rewind, replay, pause, and stop functions.
- Monitoring: Use dashboards and embedded analytics for real-time insights into process instances.
This webinar is a must-attend for developers looking to enhance their agentic automation skills and orchestrate robust, mission-critical processes.
👨🏫 Speaker:
Andrei Vintila, Principal Product Manager @UiPath
This session streamed live on April 29, 2025, 16:00 CET.
Check out all our upcoming Dev Dives sessions at https://community.uipath.com/dev-dives-automation-developer-2025/.
HCL Nomad Web – Best Practices and Managing Multiuser Environmentspanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-and-managing-multiuser-environments/
HCL Nomad Web is heralded as the next generation of the HCL Notes client, offering numerous advantages such as eliminating the need for packaging, distribution, and installation. Nomad Web client upgrades will be installed “automatically” in the background. This significantly reduces the administrative footprint compared to traditional HCL Notes clients. However, troubleshooting issues in Nomad Web present unique challenges compared to the Notes client.
Join Christoph and Marc as they demonstrate how to simplify the troubleshooting process in HCL Nomad Web, ensuring a smoother and more efficient user experience.
In this webinar, we will explore effective strategies for diagnosing and resolving common problems in HCL Nomad Web, including
- Accessing the console
- Locating and interpreting log files
- Accessing the data folder within the browser’s cache (using OPFS)
- Understand the difference between single- and multi-user scenarios
- Utilizing Client Clocking
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
2. Index
About Icon Chooser........................................................................................................................................ 3
Developing Environment & Build................................................................................................................. 6
Install Libraries for Development ......................................................................................................... 6
Build & Run............................................................................................................................................. 6
About the Memory Management in GTK+ 2.0............................................................................................ 8
GUI Programming Concept <1>: Event-Driven........................................................................................... 9
GUI Programming Concept <2>: MVC.......................................................................................................11
GTK+ 2.0 Tree View ............................................................................................................................. 13
i18n - GNU gettext ........................................................................................................................................ 16
Locale ..................................................................................................................................................... 16
Usage ...................................................................................................................................................... 19
GNU gettext in GLib/GTK+ Program................................................................................................ 24
Doxygen.......................................................................................................................................................... 26
Tools........................................................................................................................................................ 27
Configuration File................................................................................................................................. 28
Documenting the Code ......................................................................................................................... 31
Special Command ......................................................................................................................... 32
Putting documentation after members ....................................................................................... 35
Documentation at other places .................................................................................................... 37
Generate Diagrams/Graphs................................................................................................................. 39
Icon-Chooser Internals................................................................................................................................. 42
Resources ....................................................................................................................................................... 47
3. About Icon Chooser
In a Linux distro using GNOME desktop environment, when a user wants to add an application launcher on
GNOME Panel (setting steps are shown below), one of steps is to choose an icon to represent the
application and the selected icon will be shown on the panel. To survey GNOME Panel source codes, it
could find a folder named "libpanel-util" containing codes for providing icon choosing dialog - Icon
Chooser , the files panel-icon-chooser.c[.h] which use GtkFileChooserDialog widget as user interface to
select icon.
GNOME Panel source
* Archives - http://ftp.gnome.org/pub/gnome/sources/gnome-panel/
* Git Repository - https://github.com/zeldin/gnome-panel/tree/master/gnome-panel
1) Right click the panel to pop up the function menu, click “Add to Panel” item.
2) Select “Custom Application Launcher” item and click "Add" button.
Download example from GitHub:
https://github.com/wiliwe/gtk2-icon-chooser.git
Using Git tool (http://git-scm.com/downloads) to fork this repo:
git clone https://github.com/wiliwe/gtk2-icon-chooser.git
4. 3) Enter the application name in Name field and the full path to application executable program in
Command field. Input for Comment is optional.
4) Click left button to show a dialog to choose an icon(e.g. icon chooser) for your application. This
icon will be shown on desktop panel.
Click “Open” button to close dialog.
5) The choosen icon will be shown on application launcher setting dialog.
Click “OK” button click close setting dialog.
5. 6) The set application launcher is shown on desktop panel.
Cause to that the icon chooser of GNOME Panel is based on GtkFileChooserDialog widget, so the user
could not view a icon's appearance until the user select it and let it show on the panel aside. If we want to
have an icon chooser that can view all icons in a folder in visual list in a GTK+2 application, we need to
do it by ourselves.
In GTK+2, there has a widget called GtkIconView that can list icons in a grid with its picture. Icon
Chooser uses this widget to list icons in visual style. Also, this program can return the full file path of
the selected icon to the caller for further usage or manipulation. Icon Chooser was written in C++ and
runs as a modal dialog.
GtkIconView widget:
* https://developer.gnome.org/gtk2/stable/GtkIconView.html
* http://www.zetcode.com/tutorials/gtktutorial/gtkwidgetsII/
* http://www.zetcode.com/tutorials/gtktutorial/chinese/gtkwidgetsII/ 中文版
6. Developing Environment & Build
* Ubuntu 8.04 Hardy Heron LTS
* GTK+ 2.0
* Doxygen v1.5.5
Install Libraries for Development
<GLib>
Ubuntu
# sudo apt-get -y install libglib2.0-dev
CentOS 6
# su
$ yum -y install glib2-devel-*
<GTK+ 2.0>
GTK2 development library includes "gdk-pixbuf" development library.
Ubuntu
# sudo apt-get -y install libgtk2.0-dev
CentOS 6
# su
$ yum -y install gtk2-devel-*
Build & Run
In the source root of Icon Chooser program, just run “make” command to build program. If the build
process succeed, it will generate a executable file name IconChooser under the source root, run it by
entering command:
In Icon Chooser, input the full path of a directory containing icons you want to browse in the icon view by
entering the path string by hand-typing or using file chooser(dialogue) invoked by clicking the button
“Browse…”, choose the wanted icon by clicking it, then click the button “Apply” to close the chooser
dialogue and you can see the full path of the chosen icon in the console(as below snapshots).
./IconChooser
8. About the Memory Management in GTK+ 2.0
GTK+2 depends on GLib which uses GObject system to achieve object-oriented programming. The
GObject system provides a memory management model based on Reference Counting(Counter)
mechanism (the same as the one used in Microsoft COM technology) for applications to do
garbage-collection(GC).
Reference Counting means that an object has a counter that can be increased (ref-ed, referenced) or
decreased (unref-ed, unreferenced). If the counter is unref-ed to zero, the object is automatically destroyed.
This is useful, because other object or application programmers only have to think about whether they
themselves are still using that object or not, without knowing anything about others also using it. The object
is simply automatically destroyed when no one is using it any more.
XXX_new() and XXX_unref() are for creation and deletion of an object separately. When an object is
created, its reference counter will be increased from zero to one. XXX_unref() is used to decrease the
reference counter of the object. If the reference counter of the object is decreased to zero, the object will be
delete, e.g. the memory of the object will be released.
More detailed information about GObject could be found in below sites:
* https://developer.gnome.org/gobject/
* http://files.myeburg.net/gobject-book-a4.pdf
9. GUI Programming Concept <1>: Event-Driven
For GUI (Graphic User Interface) programming, one important concept is Event-Driven model:
The GUI applications start a main loop, which continuously checks for
newly generated events. If there is no event, the application waits and
does nothing(idle mode).
All GUI applications are developed based on event driven.
In the event-driven model, the operating system is the Event Manager that monitors events from hardware
devices or other widgets and dispatches events to GUI applications for processing. And the application is the
Event Handler whose function is to wait for an event to occur and then perform the corresponding action.
The software routine in the application for waiting for and processing events is called Event Loop or Main
(Event) Loop. When there has no more events to process, the application will be in idle state (mode).
Most events come from user's operations such as mouse button click or keyboard keystrokes. Events are
used to signal the changing state of an UI component (widget) in graphical user interfaces.
The event-driven model is usually implemented by means of messages passed among the participants. For
example, user clicks mouse button, the mouse sends a message to the operating system, which in turn, sends
a message to GUI application. The application processes messages one by one, and the messages not be
processed yet are put in an queue called Event Queue or Message Queue, in the order it was sent to the
application.
User Input Event
Operating System
(event manager)
GUI Application
(event handler)
/* Event Loop */
MSG msg;
while(1)
{
GetMsg(msg);
switch(msg.type)
{
case 1:
action1;
break;
...
default:
DoNothing;
} // end of switch
} // end of while(1)
10. GTK+2 depends on GLib mainloop to manage all the available sources of events. The GMainLoop data
type represents a main event loop. A GMainLoop is created with g_main_loop_new(). After adding the
initial event sources, g_main_loop_run() is called. This continuously checks for new events from each of
the event sources and dispatches them. Finally, the processing of an event from one of the sources leads to a
call to g_main_loop_quit() to exit the main loop, and g_main_loop_run() returns.
GTK+2 contains wrappers of some of GLib mainloop functions:
* gtk_main()
* gtk_main_quit()
* gtk_events_pending().
On UNIX, the GLib mainloop is incompatible with fork(). Any program using the mainloop must either
exec() or exit() from the child without returning to the mainloop.
On Linux platform, an event in GTK+2 is a message from the X server. When the event reaches a widget,
it may react to this event by emitting a signal. The GTK+2 programmer can connect a specific callback to
a signal. The callback is a handler function, that reacts to a signal (P.S: Qt framework uses similar
method for processing widget events, it calls Signal-Slot).
More detailed information about GLib/GTK+ message loop could be found in sites:
* https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
* https://developer.gnome.org/gtk2/stable/gtk2-General.html
X Server Widget Event Handlersignal
(event)
message
11. GUI Programming Concept <2>: MVC
Another important concept of GUI (Graphic User Interface) programming is Model-View-Controller,
abbreviated as MVC.
The Model-View-Controller architecture is a well-known object-oriented user interface software
architecture design paradigm/pattern and decomposition and was first introduced into object-oriented
programming language Smalltalk in the 1970s. Its concept is that complete separation between data and
how that data is displayed on the screen. Basically, MVC breaks a GUI component into three elements
(roles): model, view and controller. MVC is an example of the Observer design pattern (also known as
Dependents, Publish/Subscribe or Publisher/Subscriber) where model is the Subject and views are
Observers that can register to get notified of any change to the model.
Model
The model stores data of various type (strings, numbers, images, etc). Generally, Model is constructed first
and is the most important of all three elements: the data is the core of an application and is what an
application mainly focuses on. Moreover, data identifies the state of an application: if the data is changed,
it means the state of the application is changed.
The data remains the same no matter how the UI component is painted on the screen; model data is always
independent of the component's visual representation. Upon the model (data) is changed, the model will
send update notifications to all views that are interested in(depend on) it, so that views can retrieve the
updated data and refresh themselves; this way could be said that there has a Subscribe-Notify protocol
between model and view.
In practice, it may have many kinds of model in a GUI framework or library for different classes of
view(visual component, e.g. widget, control) and the model is implemented in some kinds of data structure
written in the programming language the GUI framework or library uses.
View
The view is told which data to display, where to display it, and how to display it by model. The view
determines the visual representation of the component’s model. This is a component’s “look.”
Controller
The controller is the portion of the user interface (view) and is responsible for determining whether the
component should react to any user action(i.e. input events from keyboard or mouse) that affects the
model or views. The controller is the “feel” of the UI component, and it determines what actions are
performed when the UI component is used.
In this separation, the view and controller depend on the model, while the model does NOT depend on
either of the two making it so the model can be independent of the visual presentation when building and
testing.
12. The three elements of a model-view-controller architecture
From book - Java Swing 2/e, 2002, O’Reilly
Communication through the Model-View-Controller architecture
One of advantages of this approach is that you can have multiple views that display the same data in
different ways, or in the same way in multiple times, with only one copy of the underlying data. This
avoids duplication of data and programming effort if the same data is re-used in different contexts and the
UI component can be updated with a new look or visual style without having to change the data model or
the controller. Also, it keeps the program modularized, allowing for high cohesion and loose coupling.
The MVC concept has been adopted into many frameworks, such as:
* Microsoft MFC Document/View Model
GUI Tool
user
Controller View
Model
The model passes its
data to the view
for rendering.
The controller
updates the model
based on the events
seesuses
Update view such
as menu selected
< user action>
The view determines
which events are
passed to the controller.
13. Document is model and CFrameWnd class is controller dispatching window messages to programmer
implemented methods
* Java Swing Framework (precisely speaking, it uses a variation of MVC pattern, Model/Delegate)
Here using table view for example. For the table view widget, JTable, it needs to set the model object
of a class derived from AbstractTableModel abstract class; when model's content is changed, it needs to
call model’s method fireTableXXX() (from AbstractTableModel class) to notify JTable to
refresh/repaint table view display depending on the changed model content
* Apache Struts (written in Java)
* Apple Mac OS X Cocoa / iOS Cocoa Touch Framework (written in Objective-C).
GTK+ 2.0 Tree View
The GtkTreeView is a widget that displays single- or multi-columned lists and trees. It replaces the old
Gtk+-1.2 GtkCList and GtkCTree widgets. The GtkTreeView widget is designed based on MVC model.
To create a tree or list in GTK+2, use the GtkTreeModel interface in conjunction with the GtkTreeView
widget. GtkTreeModel is an abstract interface to the data store and defines generic tree or list interfaces
used by the GtkTreeView widget; it only provides a way to query a data store's characteristics and to
retrieve existing data. It does not provide a way to remove rows from or add rows to the store or put data
into the store, this is done using functions of the specific store implementing GtkTreeModel interface. The
model is represented as a hierarchical tree of strongly-typed, columned data.
The programmer needs not to implement GtkTreeModel by him(her)self, two models implementing
GtkTreeModel are provided:
* GtkTreeStore is used to model tree widgets
* GtkListStore is used to model list widgets.
A list is basically just a special case of a tree with none of the items having any children, so one could use
a tree store to maintain a simple list of items as well. The only reason GtkListStore exists is in order to
provide an easier interface that does not need to cater for child-parent relationships, and because a simple
list model can be optimized for the special case where no children exist, which makes it faster and more
efficient. To use these model data structures, the developer simply pushes data into these models as
necessary. GtkListStore is internally a simple linked list and stores a list node in one of pointers.
GtkListStore and GtkTreeStore are GObjects and have a reference count of one after creation. The tree
view will add its own reference to the model when you add the model with gtk_tree_view_set_model(),
and will unref it again when you replace the model with another model, unset the model by passing NULL
as a model, or when the tree view is destroyed. This means that you need to take care of "your" reference
yourself, otherwise the model will NOT be destroyed properly when you disconnect it from the tree view,
and its memory will not be freed (which does not matter much if the same model is connected to the tree
view from application start to end).
If you plan to use the same model for a tree view for the whole duration of the application, you can get rid
14. of "your" reference right after you have connected the model to the view - then the model will be destroyed
automatically when the tree view is destroyed (which will be automatically destroyed when the window it
is in is destroyed)
There are several other components that are used with the GtkTreeView widget:
GtkTreeViewColumn A GtkTreeView is made up of tree view columns.
A model column represents a certain data field of an item that has a fixed data type
but does NOT display any data. It is only used as a device to represent the user-side
of the tree view and serves as packing widgets for the components that do the
actual rendering of data onto the screen, namely the GtkCellRenderer family of
objects.
You need to know what kind of data you want to store when you create a list store
or a tree store, as you can NOT add new fields later on.
GtkCellRenderer Cell renderers are packed into tree view columns to display data.
The GtkCellRenderer determines, how the data is going to be displayed in the
GtkTreeViewColumn. There are a number of different cell renderers that
specialize in rendering certain data like strings, pixbufs, or toggle buttons.
A tree view column needs to contain at least one cell renderer, but can contain
multiple cell renderers.
Note that the tree view will not resize icons for you, but displays them in their
original size.
GtkTreeIter A structure used to refer to a row in the GtkTreeView.
GtkTreeSelection A structure that handles selections
There has an alternative view widget to show list model (GtkListStore). This kind of the widget is
GtkIconView which is similar to GtkTreeView.
Basic Usage of Tree View
* Creating a tree view widget.
* Construct the tree model for tree view.
* Connect tree model to tree view widget by calling function gtk_tree_view_set_model().
Basic Usage of Icon View
* Creating a icon view widget.
* Construct the list model(store) for icon view.
15. * Connect tree model to icon view widget by calling function gtk_icon_view_set_model().
16. i18n - GNU gettext
If a software can display texts/strings in different natural languages for users using different mother
tongues, the software is said to be multilingual (or internationalized) software. If the software wants to have
multilingual functionality, it needs to be considered how to achieve it and what mechanism to be adopted
during design phase and adding corresponding codes when developing. Here using GNU gettext framework,
a widely used framework for internationalization, to achieve it. Before doing it, it needs to introduce some
terms relative to the development of the multilingual program.
Internationalization, i18n, is the process of making the software be able to use localization (l10n) easily
for users that vary in culture, region, or language without further any engineering changes. This is a kind of
generalization on part of the software that hard-coded information(ex: text strings) are pulled out to external
files as resource bundle and the software will load proper resource file based on the locale type set on
machine(where the software is running on) at runtime. It lets software be completely independent of any
culture specific information.
Localization, l10n, is the process of customizing the software for that it can display its messages in an
appropriately translated form for a particular locale. Internationalization and localization are the first phase
and the second phase of Globalization (g11n), the process of developing and marketing multilingual
software products to a global market.
Native Language Support, or merely NLS, is for speaking of the overall activity or feature encompassing
both internationalization and localization, allowing for multi-lingual interactions in a program.
Locale
Locale is used to define a set of information or attributes (characters and code sets, currency, dates,
numbers and messages) corresponding to a given language & country. “Messages” attribute is where GNU
gettext provides the means for developers and users to easily change the language that the software uses to
communicate to the user. The locale used by GUI programs in desktop environment can be specified in a
configuration program called “control center”, “language settings” or “country settings”.
Users achieve localization of programs by setting proper values to special environment variables, prior to
executing those programs, identifying which locale should be used. When a program looks up locale
dependent values, it does this according to following environment variables in priority order:
<1st> LANGUAGE
<2nd> LC_ALL
<3rd> LC_xxx
according to selected locale category: LC_CTYPE, LC_NUMERIC, LC_TIME,
LC_COLLATE, LC_MONETARY, LC_MESSAGES, ...
<4th> LANG .
Variables whose value is set but is empty are ignored in this lookup.
17. LANG is the normal environment variable for specifying a locale. As a user, if your language has been
installed for this package, you only have to set the LANG environment variable to the appropriate ‘ll_CC’
combination (unless some of the other variables have already been set by the system, in /etc/profile or
similar initialization files).‘ll’ is an ISO 639-1 two-letter Language code, and ‘CC’ is an ISO 3166
two-letter Country code(see below URLs).
* Language Code - http://www.loc.gov/standards/iso639-2/php/code_list.php
* Country Code - http://www.iso.org/iso/english_country_names_and_code_elements
At the shell prompt, merely execute:
CSH shell
# setenv LANG en_US
SH shell
# export LANG; LANG= en_US
BASH shell
# export LANG= en_US
or
# LANG= en_US
. This can be done from your .login or .profile file under your home directory, “/home/YourLoginName/”.
Many locale names have an extended syntax ‘ll_CC.encoding’ that also specifies the character encoding.
Most users have switched to locales in UTF-8 encoding. For example, “zh_TW.UTF-8” is for Chinese
Traditional with UTF-8 character encoding.
For a software that has been internationalized (generalized), if a user sets a particular locale, the software
will show proper information (text string) based on the language described by the locale variable when the
software is being run. This is done using the concept of Message Catalog, which is a database of strings in
some file.
GNU gettext framework is one approach supporting Message Catalog to do text i18n. This framework
refers to a collection of tools used to internationalize and localize an application or package. Apart from
internationalization of applications or packages, these tools assist in translating the strings on menus,
messages boxes or icons on the applications in the language that the user is interested in.
The below figure shows the flow to use GNU gettext tools.
18. ( From GNU gettext manual - https://www.gnu.org/software/gettext/manual/gettext.html )
The following figure shows what files would be generated when using gettext to do internationalization.
( From Wikipedia - http://en.wikipedia.org/wiki/Gettext#mediaviewer/File:Gettext.svg )
In the above figures:
* POT - Portable Object Template (.pot). This file contains all original program strings(extracted by
gettext tool xgettext). It has sets of pointers to exactly where in C sources each string is used. All
translations are set to empty. For example,
"Content-Type: text/plain; charset=CHARSETn"
"Content-Transfer-Encoding: 8bitn"
#: helloworld.c:16
#, c-format
msgid "Hello, world! n"
msgstr ""
19. * PO - Portable Object (.po). This file is made up of many entries, each entry holding the relation between
an original string and its corresponding translation. All entries in a given PO file
usually pertain to a single project, and all translations are expressed in a single target language. Also,
it needs to change character encoding for your language by setting the field “charset”. For
example:
The string after msgid is the original string and the string after msgstr is translated string.
* MO - Machine Object (.mo). This file is used to support Message Catalog. This kind of files are meant to
be read by programs, and are binary in nature. The content of the file is generated by gettext tool
msgfmt. This file could be put into your project directory or system default directory:
/usr/local/share/locale/LocaleName/LC_MESSAGES/
, where "LocaleName" is the name of the locale category such as "en", "zh", "zh_TW", etc.
Usage
Step 1. Mark texts to be internationalized
<I> Adding following headers and macros in the file containing the main() function.
* The header "libintl.h" is for the setlocale() function.
* _(String) macro is for the convenience of using gettext() on those text needs to be translated.
* PACKAGE represents package name, the name of MO file without file extension
“.mo”.
* LOCALEDIR represents the locale directory containing LC_MESSAGE folder which has
“Package Name.mo” files. This is usually as "/usr/share/locale."
#include <libintl.h>
#include <locale.h>
#define _(String) gettext (String)
#define PACKAGE MO_File_Name
#define LOCALEDIR Path_to_MO_File
"Content-Type: text/plain; charset=UTF-8n"
"Content-Transfer-Encoding: 8bitn"
#: helloworld.c:16
#, c-format
msgid "Hello, world! n"
msgstr "哈囉哈囉哈囉哈囉, 世界世界世界世界! n"
20. <II> Adding following gettext functions at the very beginning of the main() function body (but after the
variable declarations) to initialize locale data.
When it is going to compile code, remember to define "ENABLE_NLS " to use i18n/gettext.
<III> To use "_()" to enclose any string that must be translated(shown as below example).
In case you can't use "_()" (like in array declarations), use "N_()" where the original English string is
and then call "_()" at real display time(show as below example).
Step 2. Parse source files and extract marked strings as msgids and put it into
POT(.pot) file
Using GNU gettext tool, xgettext, to extract marked strings from source and store it into the POT(.pot)
file. For example:
"helloworld" is the package (domain) name assigned as the value of the macro PACKAGE in Step 1. The
keyword (-k) to mark original string as gettext string is underscore character "_." Output file is
"helloworld.pot."
Note that if it does NOT assign output file name using -o parameter, it will generate a PO file be named
after “package (domain) name” assigned using -d parameter. In this example, it will be “helloworld.po”
#ifdef ENABLE_NLS
/* Clear out LC_ALL environment variable. */
setlocale(LC_ALL, "");
/* To designate where to search for message catalogs, e.g. MO files. */
bindtextdomain (PACKAGE, LOCALEDIR);
/* (Optional) To specify the output character set(encoding) for message
catalogs for the designated domain */
bind_textdomain_codeset (PACKAGE, "UTF-8");
/* To select domain, e.g. the name of MO file */
textdomain (PACKAGE);
#endif
#define ENABLE_NLS 1
printf(_("Hello Worldn"));
char *foo[]={ N_("aaaaa"), N_("bbbb") };
int i;
for (i=0;i<2;i++) printf( _(foo[i]) );
xgettext -d helloworld -o helloworld.pot -k_ -s helloworld.c
21. file and then rename the generated file to “helloworld.pot”.
Step 3. Translate POT(.pot) file into a PO(.po) file
Copy the POT(.pot) file and change copied file's extension to ".po", this copied file becomes a PO file.
In the copied PO file, set information about your PO file by changing following fields.
Then, set proper character encoding by setting “charset” field and add translated string to “msgstr” field.
For example, the content of “helloworld.po” would be:
Finally, remove the Fuzzy Mark shown below.
The fuzzy mark is used to denote the messages in current PO file are fuzzy messages that are NOT been
validated / translated by a human translator.
If each PO file entry for which the msgstr field has been filled with a translation, and which is not marked
as fuzzy, is said to be a translated entry. Only translated entries will later be compiled by GNU msgfmt
and become usable in programs. Other entry types will be excluded.
"Content-Type: text/plain; charset=UTF-8n"
"Content-Transfer-Encoding: 8bitn"
#: helloworld.c:16
#, c-format
msgid "Hello, world! n"
msgstr "哈囉哈囉哈囉哈囉, 世界世界世界世界! n"
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
"Project-Id-Version: PACKAGE VERSIONn"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONEn"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>n"
"Language-Team: LANGUAGE <[email protected]>n"
# William.L <[email protected]>, 2008.
"Project-Id-Version: helloworld 1.0n"
"PO-Revision-Date: 2008-10-22 18:55+0800 n"
"Last-Translator: William.L <[email protected]>n"
"Language-Team: Chinese Traditional <[email protected]>n"
#, fuzzy
22. After the translation work is done, you could verify the PO file’s content by below command.
Step 4. Convert PO(.po) files into binary resource file, MO(.mo) file.
Using GNU gettext tool, msgfmt, to generates a binary Message Catalog from a textual translation
description, e.g. PO file.
Then put the generated MO files into the path designated as the macro LOCALEDIR in Step 1.
For example,
Step 5. Set locale environment variable to the language type you want and run your
program.
Set the locale environment variable, LANG, as described in “Locale” section of this chapter and then launch
your program. The following example shows results of wrong encoding type and correct encoding type.
Note that when gettext does not find a translation for msgid, it returns msgid unchanged independently of
the current output character set.
Note that when it wants to show strings in a language other than English, it needs to have other Language
Packages installed in the system where the program will run on. Below steps show how to install language
package in Linux Ubuntu.
Steps to install wanted language package:
1) On desktop panel, click System -> Administration -> Language Support .
msgfmt helloworld.po -o helloworld.mo
msgfmt -cv helloworld.po
23. 2) In "Language & Text" setting dialog, click button "Install/Remove Languages..."
3) Select and check languages you want install and click "Apply Changes" button.
24. Alternatively, it could install language packages in Synaptic Package Manager.
GNU gettext in GLib/GTK+ Program
For the program using GLib or GTK+ libraries, 1)it could replace the header "libintl.h" with "gi18n.h" or
"gi18n-lib.h" and 2)it needs not to declare macros for GNU gettext APIs.
The contents of headers "gi18n.h" or "gi18n-lib.h" are shown below:
#include <glib/gi18n.h> #include <glib/gi18n-lib.h>
25. * /usr/include/glib-2.0/glib/gi18n.h
* /usr/include/glib-2.0/glib/gi18n-lib.h
The difference of using these two headers is that one header uses fixed macro(GETTEXT_PACKAGE) to
represent the package(domain) name and the other let the macro definition to users.
#include < glib/gi18n.h >
#include <locale.h>
#define PACKAGE MO_File_Name
#define LOCALEDIR Path_to_MO_File
#define GETTEXT_PACKAGE MO_File_Name
#include < glib/ gi18n-lib.h >
#include <locale.h>
(it MUST define GETTEXT_PACKAGE before
including gi18n-lib.h header)
26. Doxygen
When viewing source codes written by others or sharing codes to others, it would be better for readers if
there have documents to comment or explain codes and show architecture(relationship of each part, such as
files, modules, packages, functions, classes, in codes) using graph or diagram. This may let readers get idea
(overview, a big map/picture) of codes quickly.
There have many tools to generate documents of source codes by adding special markings in comment
blocks, this kind of tool is called Document Generator. For a programmer, if he or she can add comments
while coding, the work to document codes could be accomplished when code is done, it would save much
time compared to that adding comments after code is done. Comments about code's implementation are
called Implementation comments. Comments describe the specification of the code, from an
implementation-free perspective to be read by developers who might not have the source code at hand, are
called Documentation comments. Tools such as JavaDoc, Doxygen, DOC++, Qt Qdoc(for Qt Project
itself only) are well-known. Doxygen is used to generate documents for Icon Chooser program..
Doxygen (http://www.doxygen.org/) is for generating documentation from annotated C++ sources, but it
also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL
(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D. It runs on
most Unix systems as well as on Windows and Mac OS X.
Doxygen is written in Qt (http://qt-project.org/). Initially doxygen was specifically designed to be used for
projects that make use of Troll Tech’s Qt toolkit. So it is ‘Qt-compatible’:
doxygen can read the documentation contained in the Qt source code and create a class browser that
looks quite similar to the one that is generated by Troll Tech. Doxygen understands the C++
extensions used by Qt such as signals and slots and many of the markup commands used in the Qt
sources.
How did the name "Doxygen" come from? From Doxygen FAQ of the official site, its solution is that:
" Doxygen got its name from playing with the words documentation and generator.
At the time I was looking into lex and yacc, where a lot of things start with "yy", so the "y" slipped in
and made things pronounceable (the proper pronouncement is Docs-ee-gen, so with a long "e")."
Doxygen FAQ link: http://www.stack.nl/~dimitri/doxygen/manual/faq.html
It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in
LATEX) from a set of documented source files. There is also support for generating output in RTF
(MS-Word), PostScript, hyperlinked PDF, compressed HTML(.chm), and Unix man pages. The
documentation is extracted directly from the sources, which makes it much easier to keep the documentation
consistent with the source code.
documentation -> docs -> dox
generator -> gen
27. The following figure shows the relation between the tools and the flow of information between them.
( From doxygen site - http://www.stack.nl/~dimitri/doxygen/manual/starting.html )
Doxygen looks at the file's extension to selects the proper parser to parse a file. Extension types
recognized by doxygen is listed in http://www.stack.nl/~dimitri/doxygen/manual/starting.html
Tools
The executable doxygen is the main program that parses the sources and generates the documentation.
To generate a manual for your project you typically need to follow these steps:
<1> Document your source code with special documentation blocks , or called special command blocks.
See http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
<2> Generate a template configuration file by running doxygen with the -g option:
doxygen -g <config_file>
28. <3> Edit the configuration file so it matches your project. In the configuration file you can specify the input
files and a lot of optional information.
<4> Let doxygen generate the documentation, based on the settings in the configuration file. The default
output directory is the directory in which doxygen is started.
<5> If you have a configuration file generated with an older version of doxygen, you can upgrade it to the
current version by running doxygen with the -u option.
All configuration settings in the original configuration file will be copied to the new configuration file.
Any new options will have their default value. Note that comments that you may have added in the
original configuration file will be lost.
More detailed information about doxygen tool is here:
http://www.stack.nl/~dimitri/doxygen/manual/doxygen_usage.html
Optionally, the doxywizard tool which is a graphical front-end written in Qt can be used for editing the
configuration file that is used by doxygen and for running doxywizard in a graphical environment. More
detailed usage information about doxywizard is here:
http://www.stack.nl/~dimitri/doxygen/manual/doxywizard_usage.html
Configuration File
A configuration file is a free-form ASCII text file with a structure that is similar to that of a Makefile, with
the default name Doxyfile. It is parsed by doxygen tool.
The file essentially consists of a list of assignment statements.
* Each statement consists of a TAG_NAME written in capitals, followed by the equal sign (=) and one or
more values.
* If the same tag is assigned more than once, the last assignment overwrites any earlier assignment.
* For tags that take a list as their argument, the += operator can be used instead of = to append new values
to the list.
* Values are sequences of non-blanks.
* If the value should contain one or more blanks it must be surrounded by quotes ("..."). Multiple lines
can be concatenated by inserting a backslash () as the last character of a line.
* Environment variables can be expanded using the pattern $(ENV_VARIABLE_NAME).
* The statements in the file are case-sensitive.
The file may contain tabs and newlines for formatting purposes.
The default encoding used for all characters in the configuration file is UTF-8 and it could be changed by
setting the tag DOXYFILE_ENCODING. Doxygen uses libiconv (or the iconv built into libc) for
doxygen <config_file>
doxygen -u <config_file>
29. transcoding. See http://www.gnu.org/software/libiconv for the list of possible encodings.
Here listing some tags usually used in project:
Tag Name Description Default
Value
Depending Tag
PROJECT_NAME A single word (or a sequence of
words surrounded by
double-quotes) that should
identify the project.
PROJECT_NUMBER Project or revision number
PROJECT_BRIEF To provide an optional one line
description for a project that
appears at the top of each page
and should give viewer a quick
idea about the purpose of the
project.
OUTPUT_DIRECTORY To specify the (relative or
absolute) path into which the
generated documentation will
be written.
OUTPUT_LANGUAGE To specify the language in
which all documentation
generated by doxygen is
written.
English
INPUT To specify the files and/or
directories that contain
documented source files.
You may enter file names like
myfile.cpp or directories like
/usr/src/myproject.
Separate the files or directories
with spaces.
If this tag is
empty the
current
directory is
searched.
RECURSIVE Be used to specify whether or
not subdirectories should be
searched for input files as well.
No
EXTRACT_ALL Assume all entities in
documentation are
documented, even if no
documentation was available.
No
EXTRACT_ANON_NSPACES Include the members of
anonymous namespaces
No
EXTRACT_LOCAL_CLASSES Include classes (and structs)
defined locally in source files.
Yes
30. EXTRACT_LOCAL_METHODS Include local methods, which
are defined in the
implementation section but not
in the interface
No
EXTRACT_PRIVATE Include private members of
a class
No
EXTRACT_STATIC Include static members of a
class
No
SORT_MEMBER_DOCS Sort the (detailed)
documentation of file and
class members alphabetically
by member name.
Yes
GENERATE_HTML Generate HTML output Yes
HTML_HEADER
HTML_FOOTER A footer typically contains the
author of the document,
copyright information, links to
terms of use, contact
information, etc.
HTML_OUTPUT Specify output folder
HTML_FILE_EXTENSION Specify the file extension .html
GENERATE_TREEVIEW No
GENERATE_HTM
L
HAVE_DOT To use dot tool to generate
diagrams and graphs
No
CALL_GRAPH Generate a call dependency
graph for every global function
or class method.
No
CALLER_GRAPH Generate a caller dependency
graph for every global function
or class method
No
GENERATE_LEGEND Yes
GRAPHICAL_HIERARCHY Yes
DIRECTORY_GRAPH Yes
UML_LOOK No
UML_LIMIT_NUM_FIELDS Threshold limits the number of
items for each type to make the
size more manageable.
Set this to 0 for no limit.
Minimum value: 0
Maximum value: 100
10
CLASS_GRAPH Yes
COLLABORATION_GRAPH Yes
HAVE_DOT
31. For a small project consisting of a few C and/or C++ source and header files, you can leave INPUT tag
empty and doxygen will search for sources in the current directory.
If you have a larger project consisting of a source directory or tree you should assign the root directory or
directories to the INPUT tag, and add one or more file patterns to the FILE_PATTERNS tag (for instance
*.cpp *.h). Only files that match one of the patterns will be parsed (if the patterns are omitted a list of source
extensions is used). For recursive parsing of a source tree you must set the RECURSIVE tag to YES.
If you start using doxygen for an existing project (thus without any documentation that doxygen is aware
of), you can still get an idea of what the structure is and how the documented result would look like. To
do so, you must set the EXTRACT_ALL tag in the configuration file to YES. Then, doxygen will pretend
everything in your sources is documented. Please note that as a consequence warnings about undocumented
members will not be generated as long as EXTRACT_ALL is set to YES.
If the EXTRACT_ALL option is set to NO in the configuration file (the default), then doxygen will only
generate documentation for documented members, files, structs, classes and namespaces.
To analyze an existing piece of software it is useful to cross-reference a (documented) entity with its
definition in the source files. Doxygen will generate such cross-references if you set the
SOURCE_BROWSER tag to YES. It can also include the sources directly into the documentation by
setting INLINE_SOURCES to YES (this can be handy for code reviews for instance).
More detailed usage information about configuration file is here:
http://www.stack.nl/~dimitri/doxygen/manual/config.html
Documenting the Code
For members, structs, classes and namespaces there are basically two options to document codes:
1. Place a special documentation block in front of the declaration or definition of the member, struct,
class or namespace. For file, struct, class and namespace members it is also allowed to place the
documentation directly after the member.
2. Place a special documentation block somewhere else (another file or another location) and put a
structural command in the documentation block. A structural command links a documentation
block to a certain entity that can be documented (e.g. a member, struct, class, namespace or file).
Files can only be documented using the second option, since there is no way to put a documentation block
before a file. Of course, file members (functions, variables, typedefs, defines) do not need an explicit
structural command; just putting a special documentation block in front or behind them will work fine.
The text inside a special documentation block is parsed before it is written to the HTML and/or LaTeX
output files.
GENERATE_LATEX Yes
32. During parsing the following steps take place:
* Markdown formatting is replaced by corresponding HTML or special commands.
* The special commands inside the documentation are executed.
* If a line starts with some whitespace followed by one or more asterisks (*) and then optionally more
white space, then all whitespace and asterisks are removed.
* All resulting blank lines are treated as a paragraph separators. This saves you from placing
new-paragraph commands yourself in order to make the generated documentation readable.
* Links are created for words corresponding to documented classes (unless the word is preceded by a %;
then the word will not be linked and the % sign is removed).
* Links to members are created when certain patterns are found in the text. This link is called Automatic
Link ( http://www.stack.nl/~dimitri/doxygen/manual/autolink.html .)
* HTML tags that are in the documentation are interpreted. More information could be found in
http://www.stack.nl/~dimitri/doxygen/manual/htmlcmds.html .
The following doxygen documenting commands are used in comment blocks for C-like languages(C, C++,
C#, Objective-C, PHP, Java).
Special Command
A special documentation block is a C or C++ style comment block with some additional markings, so
doxygen knows it is a piece of documentation that needs to end up in the generated documentation.
For each code item there are two (or in some cases three) types of descriptions, which together form the
documentation: a brief description and detailed description, both are optional.
For methods and functions there is also a third type of description, the so called ”in body” description,
which consists of the concatenation of all comment blocks found within the body of the method or
function.
Having more than one brief or detailed description is allowed (but NOT recommended, as the order in
which the descriptions will appear is not specified).
As the name suggest, a brief description is a short one-liner, whereas the detailed description provides
longer, more detailed documentation. An ”in body” description can also act as a detailed description or
can describe a collection of implementation details. For the HTML output brief descriptions are also use
to provide tooltips at places where an item is referenced.
There are several ways to mark a comment block as a detailed description:
<1> JavaDoc style
/**
* ... text ...
*/
33. <2> Qt style(e.g. Qdoc, )
In both cases the intermediate * (asterisk)’s are optional, so below example is also valid.
<3> A block of at least two C++ comment lines, where each line starts with an additional slash or an
exclamation mark.
or
<4> To make their comment blocks more visible in the documentation.
(note the 2 slashes to end the normal comment block and start a special comment block)
or
For the brief description there are also several possibilities:
<1> One could use the brief command with one of the above comment blocks. This command ends at
the end of a paragraph, so the detailed description follows after an empty line.
<2> If JAVADOC_AUTOBRIEF is set to YES in the configuration file, then using JavaDoc style
comment blocks will automatically start a brief description which ends at the first dot followed by a
/*!
* ... text ...
*/
/*!
... text ...
*/
///
/// ... text ...
///
//!
//! ... text ...
//!
/********************************************//**
* ... text
***********************************************/
/////////////////////////////////////////////////
/// ... text ...
/////////////////////////////////////////////////
/*! brief Brief description.
* Brief description continued.
*
* Detailed description starts here.
*/
34. space or new line.
The option has the same effect for multi-line special C++ comments:
<3> To use a special C++ style comment which does not span more than one line.
or
(Note the blank line in the last example, which is required to separate the brief description from the
block containing the detailed description. The JAVADOC_AUTOBRIEF should also be set to NO
for this case.)
If you have multiple detailed descriptions (as below example), they will be joined. Note that this is also the
case if the descriptions are at different places in the code! In this case the order will depend on the order in
which doxygen parses the code.
Furthermore, if there is one brief description before a declaration and one before a definition of a code
item, only the one before the declaration will be used. If the same situation occurs for a detailed
description, the one before the definition is preferred and the one before the declaration will be ignored.
Unlike most other documentation systems, doxygen also allows you to put the documentation of members
(including global functions) in front of the definition. This way the documentation can be placed in the
source file instead of the header file. This keeps the header file compact, and allows the implementer of the
members more direct access to the documentation.
/** Brief description which ends at this dot. Details follow
* here.
*/
/// Brief description which ends at this dot. Details follow
/// here.
/// Brief description.
/** Detailed description. */
//! Brief descripion.
//! Detailed description
//! starts here.
//! Brief description, which is
//! really a detailed description since it spans multiple lines.
/*! Another detailed description!
*/
35. Putting documentation after members
If you want to document the members of a file, struct, union, class, or enum, it is sometimes desired to
place the documentation block after the member instead of before. For this purpose you have to put an
additional < marker in the comment block. Note that this also works for the parameters of a function.
(This block can be used to put a Qt style detailed documentation block after a member.)
or
or
or
Most often one only wants to put a brief description after a member. This is done as follows:
or
For functions one can use the @param command to document the parameters and then use [in], [out],
[in,out] to document the direction. For inline documentation this is also possible by starting with the
direction attribute, e.g.
Note that these blocks have the same structure and meaning as the special comment blocks, only the <
indicates that the member is located in front of the block instead of after the block.
[Warning]
These blocks can only be used to document members and parameters. They cannot be used to document
files, classes, unions, structs, groups, namespaces and enums themselves. Furthermore, the structural
commands are NOT allowed inside these comment blocks.
int var; /*!< Detailed description after the member */
int var; /**< Detailed description after the member */
int var; //!< Detailed description after the member
//!<
int var; ///< Detailed description after the member
///<
int var; //!< Brief description after the member
int var; ///< Brief description after the member
void foo(int v /**< [in] docs for input parameter v. */);
36. An example of C++ code using the Qt style:
The one-line comments contain a brief description, whereas the multi-line comment blocks contain a more
detailed description.
The brief descriptions are included in the member overview of a struct, class, namespace or file and are
printed using a small italic font (this description can be hidden by setting BRIEF_MEMBER_DESC to
NO in the configuration file).
By default the brief descriptions become the first sentence of the detailed descriptions (but this can be
changed by setting the REPEAT_BRIEF tag to NO). Both the brief and the detailed descriptions are
optional for the Qt style.
By default a JavaDoc style documentation block behaves the same way as a Qt style documentation block.
This is not according the JavaDoc specification however, where the first sentence of the documentation
//! A test class.
/*!
A more elaborate class description.
*/
class Test
{
public:
//! An enum.
/*! More detailed enum description. */
enum TEnum {
TVal1, /*!< Enum value TVal1. */
TVal2, /*!< Enum value TVal2. */
TVal3 /*!< Enum value TVal3. */
}
//! Enum pointer.
/*! Details. */
*enumPtr,
//! Enum variable.
/*! Details. */
enumVar;
.....................................................
//! A function variable.
/*!
Details.
*/
int (*handler)(int a,int b);
};
37. block is automatically treated as a brief description. To enable this behavior you should set
JAVADOC_AUTOBRIEF to YES in the configuration file. If you enable this option and want to put a dot
in the middle of a sentence without ending it, you should put a backslash and a space after it as below
example.
Here is the same piece of code as shown above, this time documented using the JavaDoc style and
JAVADOC_AUTOBRIEF set to YES:
Similarly, to set QT_AUTOBRIEF to YES in the configuration file to take the first sentence of a Qt style
documentation block to automatically be treated as a brief description.
Documentation at other places
In above examples the comment blocks were always located in front of the declaration or definition of a
file, class or namespace or in front or after one of its members. Although this is often comfortable, there
may sometimes be reasons to put the documentation somewhere else.
/** Brief description (e.g. using only a few words). Details follow. */
/**
* A test class. A more elaborate class description.
*/
class Test
{
public:
/**
* An enum.
* More detailed enum description.
*/
enum TEnum {
TVal1, /**< enum value TVal1. */
TVal2, /**< enum value TVal2. */
TVal3 /**< enum value TVal3. */
}
*enumPtr, /**< enum pointer. Details. */
enumVar; /**< enum variable. Details. */
.....................................................
/**
* a function variable.
* Details.
*/
int (*handler)(int a,int b);
};
38. Doxygen allows you to put your documentation blocks practically anywhere (the exception is inside the
body of a function or inside a normal C style comment block).
The price you pay for not putting the documentation block directly before (or after) an item is the need to
put a structural command inside the documentation block, which leads to some duplication of information.
So in practice you should avoid the use of structural commands unless other requirements force you to do
so.
Structural commands (like all other commands) start with a backslash (), or an at-sign (@) if you prefer
JavaDoc style, followed by a command name and one or more parameters. The below example is for
class Test using command “class”:
Below list shows some structural commands:
FileFileFileFile ((((HeaderHeaderHeaderHeader //// SourceSourceSourceSource)))) comments
filefilefilefile Source code file name with extension file name.
datedatedatedate Date
authorauthorauthorauthor Author of this program
versionversionversionversion Program version
b Change_Historyb Change_Historyb Change_Historyb Change_History Date and contents of changing or modifying
MacroMacroMacroMacro comments
defdefdefdef To document a #def#def#def#defineineineine.
FucntionFucntionFucntionFucntion comment
fnfnfnfn to document a function.
param[in]param[in]param[in]param[in] InputInputInputInput parameter
Format: VariableName + Space + Description
param[param[param[param[outoutoutout]]]] OutputOutputOutputOutput parameter
Format: VariableName + Space + Description
returnreturnreturnreturn Function return value.
NamespaceNamespaceNamespaceNamespace comment
namesnamesnamesnamespacepacepacepace To document a namespace.
ClassClassClassClass comment
classclassclassclass To document a class.
InterfaceInterfaceInterfaceInterface comment
interfaceinterfaceinterfaceinterface To document an IDLIDLIDLIDL interface.
NoteNoteNoteNote: InterfaceInterfaceInterfaceInterfaces in C++C++C++C++ are implemented using Abstract ClassAbstract ClassAbstract ClassAbstract Class.
EnumEnumEnumEnum comment
/*! class Test
brief A test class.
A more detailed class description.
*/
39. enumenumenumenum To document an enumeration type.
StStStStuctuctuctuct comment
structstructstructstruct To document a C-struct.
UnionUnionUnionUnion comment
unionunionunionunion To document a union.
PackagePackagePackagePackage comment
packagepackagepackagepackage To document a Java package.
OtherOtherOtherOther comment
varvarvarvar To document a variablevariablevariablevariable or typedeftypedeftypedeftypedef or enumenumenumenum value.
briefbriefbriefbrief Shore description.
nnnn New line
cccc Convert font type.
More information about structural commands could be found in the page:
http://www.stack.nl/~dimitri/doxygen/manual/commands.html
Note:
1) To document a member of a C++ class, you must also document the class itself. The same holds for
namespaces.
2) To document a global C function, variable, typedef, enum or preprocessor definition you must first
document the file that contains it (usually this will be a header file, because that file contains the
information that is exported to other source files). Using a comment block containing a file or @file
command to document the file in which those commands are located.
or
3) Alternatively, you can put all members in a group (or module) using the ingroup command and then
document the group using a comment block containing the defgroup command. For member
functions or functions that are part of a namespace you should document either the class or
namespace.
Generate Diagrams/Graphs
Doxygen can use the "dot" tool from GraphViz (Graph Visualization Software) to generate more
advanced diagrams and graphs. GraphViz is an open-source, cross-platform graph drawing toolkit and can
be found at http://www.graphviz.org/
To install GraphViz tool, run below commands in two Linux distro separately:
Ubuntu
sudo apt-get -y install graphviz
/*! file */
/* * @file */
40. The below screenshot shows installed graphviz tool in Synaptic Package Manager program.
CentOS 6
$ su
# yum -y install graphviz
(prompt $ is for Regular user and prompt # is for Super user)
To view details about GraphViz package, run command:
# rpminfo graphviz
41. If you have the "dot" tool in the path, you can set tag HAVE_DOT to YES in the configuration file to let
doxygen use it.
42. Icon-Chooser Internals
In this program, it uses GtkIconView widget as the main component to list icons under a designated
directory.
This program uses GtkEntry widget for user to enter the full path to a folder containing icons wanted to be
shown.
When the text entry has new text input (either by hand-typing or file chooser), it will send out “changed”
signal and the programmer could connect a callback function to this signal for further process.
In Icon Chooser program, it is used to indicate that it is time to refresh/update list model(store) of the icon
view. After the list model is updated, it calls the function gtk_icon_view_set_model() to update icon view’s
model with the updated one.
Icon Chooser applies GNU gettext on 1)the main dialog/window title, 2)the title of file chooser dialog, 3)the
label on the button and 4)the labels indicating the number of icons. Below screenshots show the result.
43. In Icon Chooser program, the special mark used in comment blocks for Doxygen document generation is Qt
style.
or
The doxygen configuration files are in the “doxygen“ folder under Icon Chooser program source root. There
are two configuration files, one for generating documents with graphs (this needs graphivz tool to be
installed) and the other is for the document without graphs. By running command “doxygen Conf-File” to
generate documents.
If it succeeds to generate documents, it will have a folder named “html“ in the doxygen folder.
/*!
* ... text ...
*/
/*!
... text ...
*/
44. The main Web page of the generated HTML document is “index.html”.
The below figures show screenshots of Icon Chooser program HTML documents generated by doxygen.
46. (If you want to let the document include your source codes for browsing, remember to set the variable
“SOURCE_BROWSER” to YES in the doxygen configuration file.)
47. Resources
GTK+ 2.0
# https://developer.gnome.org/gtk2/stable/
# http://www.dgsiegel.net/files/tog2dg.pdf The Official GNOME 2 Developer's Guide
# http://www.yolinux.com/TUTORIALS/GTK+ProgrammingTips.html
# http://www.zetcode.com/tutorials/gtktutorial/
# http://www.zetcode.com/tutorials/gtktutorial/chinese/ 中文中文中文中文
# http://tetralet.luna.com.tw/index.php?op=ViewArticle&articleId=188&blogId=1 中文中文中文中文
# http://pcman.sayya.org/tnlug-2006.02.18/tnlug.pdf Introducing GTK+ by PCMan (洪任諭洪任諭洪任諭洪任諭)
# http://www.gtkbook.com/
# http://book.huihoo.com/gtk+-gnome-application-development/
GTK+ 2.0 Tree View
# https://developer.gnome.org/gtk2/stable/TreeWidgetObjects.html
# http://scentric.net/tutorial/treeview-tutorial.html
# http://scentric.net/tutorial/treeview-tutorial.pdf
# http://scentric.net/tutorial/treeview-tutorial.tar.gz Example code for Treeview tutorial
# http://chingyichan.tw.googlepages.com/gtk_tree_view_tutorial.html 中文中文中文中文
# http://www.zetcode.com/tutorials/gtktutorial/gtktreeview/
# http://www.zetcode.com/tutorials/gtktutorial/chinese/gtktreeview/ 中文中文中文中文
# http://inti.sourceforge.net/tutorial/libinti/treeandlistwidget.html
# http://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View
GNU gettext (i18n)
# https://www.gnu.org/software/gettext/
# http://fedoraproject.org/wiki/How_to_do_I18N_through_gettext GNU gettext tutorial with example
# http://nkumar.fedorapeople.org/helloi18n GNU gettext example
# http://people.linux.org.tw/~pofeng/free-doc/linuxi18n/gtk.html Internationalize Gtk+ programs