Esempio n. 1
0
void gg_container_init(gg_container_t *container) {
	gg_widget_init((gg_widget_t *)container);

	container->destroy = gg_container_destroy;
	container->id = gg_container_get_class_id();
	container->widget_list = list_create();
}
Esempio n. 2
0
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <gamegui/bin.h>

gg_class_id gg_bin_get_class_id()
{
    GG_CHILD(gg_container_get_class_id())
}

gg_widget_t *gg_bin_get_child(gg_bin_t *bin)
{
    return gg_container_get_child(GG_CONTAINER(bin), 0);
}

void gg_bin_set_size(gg_widget_t *widget, int width, int height)
{
    gg_widget_t *child = gg_bin_get_child(GG_BIN(widget));

    if (child)
        child->set_size(child, width, height);

    gg_set_size(widget, width, height);